Page 1 of 1

datastage char(2006-03-04) to timestamp(2006-03-04:00:00:00)

Posted: Thu May 22, 2008 11:36 am
by karrisuresh
Hi My source column is char(10) and value is "2006-03-04"
Now My interest is to convert into timestamp 2006-03-04:00:00:00
can I get the exact syntax for this

src is dataset with datatype char 10
tgt is dataset with datatype timestamp


thanks
Suresh

Posted: Thu May 22, 2008 11:50 am
by kumar_s
Timestamp datatype internal to Datastage would have micro seconds too.
You can concatinate the 0's and use the following function TimestampFromDateTime with this syntax %yyyy-%mm-%dd
%hh:%nn:%ss.x.

Posted: Thu May 22, 2008 3:19 pm
by ray.wurlod
TimestampFromString(), surely?