Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.
Moderators: chulett, rschirm, roy
-
khaja.arshad
- Participant
- Posts: 30
- Joined: Mon May 29, 2006 11:19 pm
Post
by khaja.arshad »
Hello All
Is there any function in DS sever edition to get last date of the prior month .
I have searched in forum but unable to find specfic solutuion
Thanks In Advance
-
rleishman
- Premium Member
![Premium Member Premium Member](./images/ranks/premium.gif)
- Posts: 252
- Joined: Mon Sep 19, 2005 10:28 pm
- Location: Melbourne, Australia
-
Contact:
Post
by rleishman »
Get the day of the month (should be possible with oconv) and then subtract that number for the date.
Ross Leishman
-
balajisr
- Charter Member
![Charter Member Charter Member](./images/ranks/charter_member%s.gif)
- Posts: 785
- Joined: Thu Jul 28, 2005 8:58 am
Post
by balajisr »
Get Internal value of the first day of the month using IConv
Subtract internal value by 1.
OConv the resultant internal value.
-
chulett
- Charter Member
![Charter Member Charter Member](./images/ranks/charter_member%s.gif)
- Posts: 43085
- Joined: Tue Nov 12, 2002 4:34 pm
- Location: Denver, CO
Post
by chulett »
There is also the MONTH.LAST transform available in the Built-In / Dates category.
-craig
"You can never have too many knives" -- Logan Nine Fingers
-
khaja.arshad
- Participant
- Posts: 30
- Joined: Mon May 29, 2006 11:19 pm
Post
by khaja.arshad »
The following code given the solution
It's working
Oconv(Iconv(Arg1, "D2/") - Oconv(Iconv(Arg1, "D2/"), "DD"),"D/DMY")
Thanks to every one
Regards
Hameed
-
kumar_s
- Charter Member
![Charter Member Charter Member](./images/ranks/charter_member%s.gif)
- Posts: 5245
- Joined: Thu Jun 16, 2005 11:00 pm
Post
by kumar_s »
DATE.TAG can also be used to find the Date component.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'