Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> to_char not returning 'day' value without leading zero
I have the following query, which returns dates, but those dates
contain leading zeros for the DD part, even though I'm using the
fill_mode FM, i.e. FMDD
SELECT
to_char(date_created,'FMMM/FMDD/YYYY') as date_joined,
FROM
user_table
GROUP BY
to_char(date_created,'FMMM/FMDD/YYYY')
ORDER BY
MIN(date_created) DESC"
the results I get are like this: 3/08/2006
this page: http://www.techonthenet.com/oracle/functions/to_char.php - tells me that adding FM before my date parts will remove the leading zero - and as you can above, the leading zero from the MM part is gone, but it's still there for the DD part.
anyone know how to remove this? I could do a simple ASP replace truck, and looks for any "/0" and replace with "/", but that seems unncessary... but then again, it FMDD won't work....
TIA for any help you can give Received on Thu Apr 06 2006 - 16:32:29 CDT