Oracle date formatting tutorial, oracle date tutorial
Oracle date formatting tutorial
Select 1 as fld_TM_cartons, TO_CHAR (SYSDATE + 1, 'month/DD/YYYY ') as fld_TMD_order_no, nvl (ps. wmps_grossweight, 0) as grossweight, nvl (ps. wmps_cubic, 0)
From table
I want to add a column in the select statement to show that the current system date format is "July 07 2014 AM_BWB_Manifest ".
"How should I write this style? The monthly requirement should be displayed in English, and then AM/PM should be displayed, and _ BWB_Manifest should be added after AM/MP.
To_char (sysdate, 'month dd yyyy hh: miam', 'nls _ DATE_LANGUAGE = 'American ''') | '_ BWB_Manifest'
In this way, you can.
Then it appears again. After the month becomes English, there is a space between it and the date, because its fixed length is 9, so there will be many spaces.
Finally, I changed it. I took out the month separately, trim off the space, and then put it together.
Select trim (to_char (sysdate, 'month', 'nls _ DATE_LANGUAGE = American ') | ''| to_char (sysdate, 'dd yyyy hh: miam ') | '_ BWB_Manifest' as fld_TO_filename from dual;