Char to Timestamp conversion !!

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
its_me48
Participant
Posts: 33
Joined: Fri Apr 29, 2005 10:09 am

Char to Timestamp conversion !!

Post by its_me48 »

Hello:

I have source date colum (report_dt) coming in as CHAR in the following format: YYYYMMDD (20120606) and I would like to convert into Timestamp so that I can load it in Oracle table as Timestamp (2012-06-06 00:00:00)

Parallel version has a StringToDate(report_dt, "%yyyy%mm%dd") functionality that does not exist in Server version I am developing. I tried Iconv/Oconv (after searching here and trying it out) but got lost somewhere and does not work.

Please help.

Thank You!!
its_me48
Participant
Posts: 33
Joined: Fri Apr 29, 2005 10:09 am

Post by its_me48 »

Figured it out. Closed.

Solution to convert char (YYYYMMDD) to Timestamp (YYYY-MM-DD HH24:MI:SS) in "Server" edition
In the transformer
OConv(IConv(Dr.REPORT_DT, 'D/YMD[4,2,2]'), 'D-YMD[4,2,2]') : ' 00:00:00'
Post Reply