Converting string to Timestamp
Posted: Thu Jan 17, 2008 11:49 pm
Hi All,
In my project we use a DB2 DB as source.and I am loading data to dataset.I have a column in one of the source table which is Varchar(50).The data looks like this:
11/01/2000 2:21:03 PM
10/26/2000 9:45:28 AM
12/27/2000 1:15:06 PM
10/26/2000 11:20:43 AM
10/26/2000 11:28:08 AM
11/01/2000 11:39:35 AM
10/31/2000 12:49:31 PM
11/01/2000 11:37:20 AM
I have to convert this to Timestamp before loading to the dataset.I tried these options:
1.While pulling this column from source I used TIMESTAP_FORMAT funtion in DB2.But this needs data in 'YYYY-MM-DD HH24:MI:SS format.So this option did not work.
2.I used StringToTimestamp functoin in Datastage.But this results *s in my dataset.
3.I tried using modify stage and output was NULL.
If anyone has come across same kind of problem please let me know.
Thanks in advance!!!!!!!!!
Regards,
Shiva
In my project we use a DB2 DB as source.and I am loading data to dataset.I have a column in one of the source table which is Varchar(50).The data looks like this:
11/01/2000 2:21:03 PM
10/26/2000 9:45:28 AM
12/27/2000 1:15:06 PM
10/26/2000 11:20:43 AM
10/26/2000 11:28:08 AM
11/01/2000 11:39:35 AM
10/31/2000 12:49:31 PM
11/01/2000 11:37:20 AM
I have to convert this to Timestamp before loading to the dataset.I tried these options:
1.While pulling this column from source I used TIMESTAP_FORMAT funtion in DB2.But this needs data in 'YYYY-MM-DD HH24:MI:SS format.So this option did not work.
2.I used StringToTimestamp functoin in Datastage.But this results *s in my dataset.
3.I tried using modify stage and output was NULL.
If anyone has come across same kind of problem please let me know.
Thanks in advance!!!!!!!!!
Regards,
Shiva