Page 1 of 1

How to default a Timestamp Field?

Posted: Tue Mar 16, 2010 10:14 pm
by deepa_shenoy
Hi,

I want to deafult a Timestamp field to ''12/31/9999 00:00:00"

How would I do this in a Transformer stage?

I tried:
StringToTimestamp('12/31/9999 00:00:00',"mm/dd/yyyy hh:nn:ss")


TimestampFromDateTime(StringToDate('12/31/9999',"mm/dd/yyyy"), StringToTime('00:00:00',"%hh:%nn:%ss"))

Both did not work correctly. A fatal error was thrown.

How to resolve this issue?

Thanks in advance.

Deepa

Posted: Wed Mar 17, 2010 1:57 am
by ray.wurlod
WHERE did you try StringToTimestamp() function?

Posted: Fri Mar 19, 2010 9:59 pm
by deepa_shenoy
I gave it in the derivation column within the Transformer.

I got the solution though.

This works: TimestampFromDateTime(StringToDate('9999-12-31',"%yyyy-%mm-%dd"), StringToTime('00:00:00',"%hh:%nn:%ss"))