Another Date question

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
seanc217
Premium Member
Premium Member
Posts: 188
Joined: Thu Sep 15, 2005 9:22 am

Another Date question

Post by seanc217 »

If I have a text string which is a date coming in from a sequential file as such : 1/1/2006 and I want to use the StringtoDate function on it, It appears that I will have to manipulate the date to 0 fill both the 1's so that is appears as such: 01/01/2006.

Is this correct?

Or is there are format for the date as I specified above?

Thanks.
seanc217
Premium Member
Premium Member
Posts: 188
Joined: Thu Sep 15, 2005 9:22 am

Post by seanc217 »

I was able to solve this one by parsing the date out and adding the place holders as necessary.

If anyone is interested in how I did it let me know I will post the code.

Thanks.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Couldn't you just have specified %mm/%dd/%yyyy (or %dd/%mm/%yyyy) as the date format in the function?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply