Hi
Iam new to DataStage, can anyone help me how to get the Next avialable Date using DataStage's builtin functions,..etx.
Example: Iam using Date format as YYYYMMDD (integer) as a parameter.
So if my current parameter is 20060507, then I want next available date
as 20060508 like wise for 20060531, its 20060601.
basically i want to use the result value as parameter to another job in a sequence.
thanks
Function to find get Next Date
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 385
- Joined: Tue Oct 07, 2003 4:55 am
Hi,
Use the ICONV/ OCONV functions
change the date into internal representation, add 1 day and switch back to date format
e.g:
HTH
Amos
Use the ICONV/ OCONV functions
change the date into internal representation, add 1 day and switch back to date format
e.g:
Code: Select all
nextDay = Oconv( Iconv ( yourDate , "D4YMD[4,2,2]") + 1, "D4YMD[4,2,2]")
HTH
Amos
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
And strip out the delimiters in the generated date.
Code: Select all
Oconv(Iconv(yourDate, "DYMD") + 1, "DYMD[4,2,2]" : @VM : "MCN")
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.