Page 1 of 1

StringToDate

Posted: Tue Jun 10, 2008 4:55 am
by platonfi
Hi!
SELECT TO_CHAR
(EVENT_TIMESTAMP, 'YYYY-MM-DDHH24:MI:SS') from SOURCE
-> need to convert field for datetime -format, but HOW?

StringToDate or StringToTime? I

Reg Minna :idea:

Posted: Tue Jun 10, 2008 5:08 am
by karthik_j013
You can use stringtotimestamp.

Posted: Tue Jun 10, 2008 5:08 am
by karthik_j013
You can use StringToTimestamp.

Posted: Tue Jun 10, 2008 5:31 am
by platonfi
stringtotimestamp, what is a syntax?

Posted: Tue Jun 10, 2008 5:58 am
by ArndW
The syntax is well-document in the DataStage Parallel Job Developer Guide and is StringToTimeStamp({column},{format}). In your case the format would be '%yyyy-%mm-%dd%hh:%nn:%ss'

Posted: Tue Jun 10, 2008 7:27 am
by platonfi
Thanks a lot!!


Reg Minna