|
-
Date Format Wrong
I have the sysdate formatted to come out in my log with the following format : to_char(sysdate,'fmMonth ddth, YYYY, "at" HH:MI A.M.')
but when it comes out it does not print the zeros:
March 5th, 2003, at 9:5 A.M.
which should be March 5th, 2003, at 9:05 A.M.
Anyone know why this is happening?
-
It's happening because you have "fm" in your format model. From Oracle docs:
"In a date format element of a TO_CHAR function, this modifier suppresses blanks in subsequent character elements (such as MONTH) and suppresses leading zeroes for subsequent number elements (such as MI) in a date format model."
Remove the "fm" from your format string or replace it with "fx", ie
'Month ddth, YYYY, "at" HH:MI A.M.' or 'fxMonth ddth, YYYY, "at" HH:MI A.M.'
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|