This topic has been marked "Resolved."
This topic is not resolved, but there is a WORKAROUND.
Author
Message
petburn
Participant
Joined: 23 May 2006
Posts: 2
Location: Rennes (35) - France
Points: 25
DataStage® Release: 6x
Job Type: Server
OS: Windows
hello everybody,
i'm a new Datastage Developers.
i have a problem.
i explain myself :
i have to integrate one file into a data base.
the file is like it.
article;Qty1;Qty2;Qty3...Qt60
ex :
00001;1;2;3;4....60
the table in the data base is like this.
article - ref_Date - prevision_date - Qty
00001 - 20060523 - 20060529 - 1
00001 - 20060523 - 20060605 - 2
...
ref_Date is sysdate (i do not have any problem with tis)
the prevision_date is the next 60 monday. (one for each column in the file.)
so, my problem is.
how to get the date of the next monday. (the others will be next monday + 7 days...)
i wish you understand my problem.
thanks for your attention.
PS : sorry for my poor english, but i'm french and i do not speak english.
bye.
jerome
ray.wurlod
Participant
Group memberships: Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group
Joined: 23 Oct 2002
Posts: 49927
Location: Canberra, Australia
Points: 271359
The trick you need is to realize that the internal format of dates in server jobs is an integer. If you divide by 7 and take the remainder (the Mod() function), then the result is 0 for Sunday, 1 for ...
_________________ RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong
Delivering Outcomes Together
petburn
Participant
Joined: 23 May 2006
Posts: 2
Location: Rennes (35) - France
Points: 25
thanks, i'll test it tomorow.
bye.
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