Conversion using to_date(to_char(date field) )
470436May 7 2010 — edited May 10 2010Dear Guru's
I have a table with Date Field . This stores only the Date and there is no time stored.
For a report i want the Date with time to be displayed. Since There is no time , the time to be displayed should be 12:00:00 along with the date
So i used To_char(SSDATE, 'DD-MON-YYYY HH:MI:SS') where ssdate is the name of the Date filed. This worked fine
I am using this in a function which returns a date . Hence i converted the above back to date like this
To_Date(To_Char(SSDATE,'DD-MON-YYYY HH:MI:SS'),'DD-MON-YYYY HH:MI:SS')
But the out put was like this 12/1/2001 12:00:00 PM. There is a PM appended to it which i dont need.
why this happens and how i can avoid the PM.
WIth Warm Regards
Ssr