1
votes

I want to display the time stamp in following format '2011-04-22 10:41:57.000' to date as '04/22/2011' but when it convert it to following form TO_DATE(TO_CHAR(Date), 'MM/DD/YYYY HH24:MI:SS') it is displaying as null.

I am planning to use substring after the conversion

Can someone please tell me where i am going wrong?

2
Is your source a table and target a file?Samik

2 Answers

0
votes

You can simply do TO_CHAR(Date, 'MM/DD/YYYY')

0
votes

i used 'TO_DATE(TO_CHAR(Date), 'MM/DD/YYYY HH24:MI:SS')' and later 'SUBSTR(Date_V,1,11)' and i got required output