Page 1 of 1
Currentdate-1 ?
Posted: Wed Jan 31, 2007 2:58 pm
by swades
Hi,
Can anyone help me how to calculate currentdate()-1 ?
Thanks
Posted: Wed Jan 31, 2007 3:05 pm
by DSguru2B
Where do you want to do that, in DataStage? or in a database stage?
Posted: Wed Jan 31, 2007 3:08 pm
by swades
I want to do this in Datastage.
Thanks
Posted: Wed Jan 31, 2007 3:11 pm
by paddu
here you go to use in transformer
OCONV(ICONV(@Date,"D4-YMD[4,2,2]")-1,"D4-YMD[4,2,2]")
Change the format to meet your requirement
Posted: Wed Jan 31, 2007 3:13 pm
by I_Server_Whale
paddu wrote:here you go to use in transformer
OCONV(ICONV(@Date,"D4-YMD[4,2,2]")-1,"D4-YMD[4,2,2]")
Change the format to meet your requirement
Paddu,
Iconv and Oconv aren't available in PX.
Posted: Wed Jan 31, 2007 3:15 pm
by swades
Thanks
I want that in PX.
Thanks
Posted: Wed Jan 31, 2007 3:23 pm
by DSguru2B
You can do it inside the transformer. Something like
Code: Select all
DateFromJulianDay(JulianDayFromDate(DSJobStartDate) -1)
Posted: Wed Jan 31, 2007 3:37 pm
by swades
Thanks you very much
I used
Code: Select all
DateFromJulianDay((JulianDayFromDate(CurrentDate())-1))
It works fine
Thanks again.
Posted: Wed Jan 31, 2007 3:49 pm
by I_Server_Whale
swades wrote:Thanks you very much
I used
Code: Select all
DateFromJulianDay((JulianDayFromDate(CurrentDate())-1))
It works fine
Thanks again.
I think you can remove the extra pair of parenthesis.
Code: Select all
DateFromJulianDay(JulianDayFromDate(CurrentDate())-1)
Posted: Wed Jan 31, 2007 4:31 pm
by paddu
sorry overlooked