DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
This topic has been marked "Resolved."
Author Message
dnat
Participant



Joined: 06 Sep 2007
Posts: 192

Points: 1773

Post Posted: Mon Nov 13, 2017 12:13 pm Reply with quote    Back to top    

DataStage® Release: 11x
Job Type: Parallel
OS: Unix
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



Joined: 08 Nov 2017
Posts: 21

Points: 158

Post Posted: Mon Nov 13, 2017 12:58 pm Reply with quote    Back to top    

Please refer below link

http://www.dsxchange.com/viewtopic.php?p=388928

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

_________________
Venkata Srini
Rate this response:  
sriven786
Participant



Joined: 08 Nov 2017
Posts: 21

Points: 158

Post Posted: Mon Nov 13, 2017 1:14 pm Reply with quote    Back to top    

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
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours