in DB2 I've got date values stored as varchar in the form 'DD-Mon-YY'
(e.g. 25-Jun-13). I'd like to convert these into DB2 compatible date formats using the TO_DATE
function but every date conversion format I've tried gives me an error.
e.g. I've tried TO_DATE('25-Jun-13', 'YYYYMMDD')
and TO_DATE('25-Jun-13', DDMMYYYY)
and I always get something like "25-Jun-13" cannot be interpreted using format string "DDMMYYYY" for the TIMESTAMP_FORMAT function.
Does anyone know if there is a format string that I can use?
I think you're looking for:
Aside:
TO_DATE
is just a synonym forTIMESTAMP_FORMAT
.