I've trawled the SO website thinking this is pretty obvious but alas I have not found one yet. Basically the setup is as follows:
I have a string in a table like so:
06/22/2010 00:00:00
I do a select on it:
SELECT To_Date(item, 'MM/DD/YYYY HH24:MI:SS') from that_table
so that effectively I am doing
SELECT To_Date('06/22/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS') from that_table
My database returns:
22.06.2010 00:00:00
Now I know I can do a
to_char(to_Date('06/22/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'MM/DD/YYYY HH24:MI:SS')
but I need the select to return a date format (MM/DD/YYYY HH24:MI:SS
), not a string. How can I do that?
Edit: Real output:
22.06.2010 00:00:00
Desired output (in Date format):
06/22/2010 00:00:00