Convert of char 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
monaz
Participant
Posts: 98
Joined: Sat Aug 23, 2008 3:14 am

Convert of char to timestamp

Post by monaz »

hi All,

My requirement is that we are extracting from the source whose data of feild process_date is type of datetime.
I have converted process_date to char(8) for my lookup purpose.

I have to load in Dataset file back to Timestamp datatype so i tried using StringToTimestamp in transformer stage for that feild.

but i am getting in output file for that feild process_date(*************)

Please suggest..
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Did you search? There are loads of relating post.

Try to display the original value you wish to transform.
monaz
Participant
Posts: 98
Joined: Sat Aug 23, 2008 3:14 am

Re: Convert of char to timestamp

Post by monaz »

monaz wrote:hi All,

My requirement is that we are extracting from the source whose data of feild process_date is type of datetime.
I have converted process_date to char(8) for my lookup purpose.

I have to load in Dataset file back to Timestamp datatype so i tried using StringToTimestamp in transformer stage for that feild.

but i am getting in output file for that feild process_date(*************)

Please suggest..
Sorry i got the solution from our forum itself i used
"StringToTimestamp(TRIM(INPUTCOL):"000000","%yyyy%mm%dd%hh%nn%ss") "

Thanks
Post Reply