Hi Friends,
I am getting a column(DATE)Timestamp in transformer stage say ex 29-05-2010 06:00:00 I want to add +4 days in the transformer stage.
when I say DATE+4 in transformer stage it doesnt work can anyone help me with function or the way to add 4 days for the input DATE
Thanks
DATE
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You will need to separate the date and time components. Get these date arithmetic routines and add 4 days to the date, then re-assemble the time portion onto the end.
Or:
Or:
Code: Select all
Oconv(Iconv(Field(InLink.MyTimestamp," ",1,1), "DYMD") + 4, "D-YMD[4,2,2]") : " " : Field(InLink.MyTimestamp," ",2,1)
Last edited by ray.wurlod on Wed Jun 09, 2010 4:21 pm, edited 1 time in total.
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.
Hi Ray,ray.wurlod wrote:You will need to separate the date and time components. Get these date arithmetic routines and add 4 days to the da ...
I dont have the premium membership can you please help me with the code
Thanks
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
Even if you don't have premium membership, you have the lead from that small portion.
Only thing is you need to have understanding of Iconv and oconv function.
you need to split date part and time part and add 4 days to date and then concatanate with time part.
IConv of date returns a number which is number of days from 1970. So adding 4 to that you will get date+4 and then convert it to date format using OConv.
Only thing is you need to have understanding of Iconv and oconv function.
you need to split date part and time part and add 4 days to date and then concatanate with time part.
IConv of date returns a number which is number of days from 1970. So adding 4 to that you will get date+4 and then convert it to date format using OConv.
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.
Genius may have its limitations, but stupidity is not thus handicapped.
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
Sorry for not posting the exact code, but in case you dont want to write it on your own, please hire someone who can or get the premium membership to look at Ray's post.
Try it, its quite simple to write that code.
EDIT:- by the way click on the link to get routines written by Ray to make the task easy.
Try it, its quite simple to write that code.
EDIT:- by the way click on the link to get routines written by Ray to make the task easy.
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.
Genius may have its limitations, but stupidity is not thus handicapped.