Page 1 of 1

Date format issues

Posted: Mon Nov 13, 2017 12:13 pm
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?

Re: Date format issues

Posted: Mon Nov 13, 2017 12:58 pm
by sriven786
Please refer below link

viewtopic.php?p=388928

I guess you can use StringToDate(Trim(DSLink2.File_Date),'%dd-%mmm-%2000yy')

Re: Date format issues

Posted: Mon Nov 13, 2017 1:14 pm
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