Page 1 of 1

Converting the String value into timestamp

Posted: Fri Jun 11, 2010 11:35 am
by nagarjuna900
HI,

i am getting the two fields from source file ( one is Date field, second field is Time field). The datatype of two fields is varchar. That two fields ( Date and Time) needs to converted as combination of DateTime, datatype is Timestamp.

Pl give me the possibility,

Thanks,

Posted: Fri Jun 11, 2010 12:13 pm
by anbu
Use StringToDate and StringToTime functions
StringToDate(Dt,"%yyyy-%mm-%dd") : StringToTime(Tm,"%hh:%nn:%ss")

Posted: Fri Jun 11, 2010 6:49 pm
by ray.wurlod
Why not StringToTimestamp(InLink.TheDate : " " : InLink.TheTime) ? If course your elements need to be in the appropriate ISO 8601 format for this to work.