Page 1 of 1

Null to Timestamp

Posted: Wed Sep 08, 2010 7:51 am
by jpraveen
Hi

while i am converting a null value to Time-stamp,the job is getting aborted with the error

APT_CombinedOperatorController,0: Conversion error calling conversion routine timestamp_from_string data may have been lost

and i had written the logic as

Code: Select all

If IsNull(OUT_PROVIDER_FACILITY.BEG_EFF_DATE) Then StringToTimestamp(18581117) Else OUT_PROVIDER_FACILITY.BEG_EFF_DATE

i want the output as 1858-11-17 00:00:00 for all null values,
can any one post the code to me.


Thanks
Praveen

Re: Null to Timestamp

Posted: Wed Sep 08, 2010 7:58 am
by PhilHibbs
Try StringToTimestamp("1858-11-17 00:00:00")

Posted: Wed Sep 08, 2010 8:04 am
by chulett
You need to supply a matching format mask so it knows how to parse the incoming string.