Null to Timestamp

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
jpraveen
Participant
Posts: 71
Joined: Sat Jun 06, 2009 7:10 am
Location: HYD

Null to Timestamp

Post 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
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

Re: Null to Timestamp

Post by PhilHibbs »

Try StringToTimestamp("1858-11-17 00:00:00")
Phil Hibbs | Capgemini
Technical Consultant
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You need to supply a matching format mask so it knows how to parse the incoming string.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply