Page 1 of 1

Char to Timestamp conversion !!

Posted: Wed Jun 06, 2012 8:19 am
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!!

Posted: Wed Jun 06, 2012 8:45 am
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'