Date format issues

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
dnat
Participant
Posts: 200
Joined: Thu Sep 06, 2007 2:06 am

Date format issues

Post by dnat »

Hi,

I have a date in the file as 10/11/17 and i am trying to load it into the table.

When i use this function StringToDate(Trim(DSLink2.File_Date),'%(d,s)/%(m,s)/%yy'),

I tried to output in a seq file and its output is "1917-11-10"..Why is it giving the ouput as 1917 instead or 2017?. Is this how it should work?
sriven786
Participant
Posts: 37
Joined: Wed Nov 08, 2017 1:36 pm

Re: Date format issues

Post by sriven786 »

Please refer below link

viewtopic.php?p=388928

I guess you can use StringToDate(Trim(DSLink2.File_Date),'%dd-%mmm-%2000yy')
Venkata Srini
sriven786
Participant
Posts: 37
Joined: Wed Nov 08, 2017 1:36 pm

Re: Date format issues

Post by sriven786 »

Note: Assuming that your Input date all have >2000 (20th Century)
Otherwise, please request them to provide with Century part also if you are expecting dates before 2000
Venkata Srini
Post Reply