Date Conversion

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

O ok. Always love your "to the point" answers :D
There has to be an explanation for this then. Thats the best that I could come up with.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I'd have to see the actual job and have access to the source data to know what was going on. I just know it ain't that. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
sri75
Premium Member
Premium Member
Posts: 132
Joined: Thu Sep 09, 2004 12:42 pm

Post by sri75 »

Thanks for all of your inputs and suggestions.

finally I stick with this derivation
Iconv(DSLink71.HIRED, "DMDY").

I have another question , in .csv file the values of the column is '11/3/2007' in this format.but when reading from sequential file it is reading only last 2 digits of the year.I want to read all 4 digits.Can you plesae let me know where to make changes in seq file to get full year

Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

What is your datatype in the Sequential file stage? Use a Varchar if you don't want the reader to muck with the values.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sri75
Premium Member
Premium Member
Posts: 132
Joined: Thu Sep 09, 2004 12:42 pm

Post by sri75 »

HI thanks for all of your inputs and suggestions

I stick with this derivation

Iconv(DSLink71.HIRED, "DMDY[2,2,4]")

I have another question,in .csv file the format of the column looks like this
'11/03/2007', but when I am reading from seq file, it is showing only 2 digits o fthe year.Can you please tell me what needs to be done on seq file side to get all 4 digits


Thanks
sri75
Premium Member
Premium Member
Posts: 132
Joined: Thu Sep 09, 2004 12:42 pm

Post by sri75 »

sorry, submitted 2 times
sri75
Premium Member
Premium Member
Posts: 132
Joined: Thu Sep 09, 2004 12:42 pm

Post by sri75 »

sorry, submitted 2 times
sri75
Premium Member
Premium Member
Posts: 132
Joined: Thu Sep 09, 2004 12:42 pm

Post by sri75 »

changed to varchar, still it is showing 2 digits
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Is it really showing two digits or the display of that particular column is set to 8 instead of 10?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
sri75
Premium Member
Premium Member
Posts: 132
Joined: Thu Sep 09, 2004 12:42 pm

Post by sri75 »

something goofy happened, when I moved file from windows to Unix.
I copied the file again to unix ,now it is showing 4 digits
Post Reply