Monday, June 25, 2012

Oracle DB dates

Official Doc on DATE datatype:

Use TO_CHAR(mydate, 'MM/DD/YYYY HH24:MI:SS') to display the Date

WARNING: when you export your tables in Oracle SQL Developer using the "INSERT" format, DATE columns are TRUNCATED to midnigth, with a to_date('22-JUN-12','DD-MON-RR') statement.

TO_DATE('2012-08-13 11.20.00', 'YYYY-MM-DD HH24:MI:SS')

to do the opposite conversion

No comments: