Page 1 of 1
previous date
Posted: Thu Oct 20, 2011 12:51 am
by vinsashi
i want to extract previous timestamp from current timestamp filed in datastage PX.
Thanks
v......
Re: previous date
Posted: Thu Oct 20, 2011 12:56 am
by deeplind07
can you please explain in detail?
Posted: Thu Oct 20, 2011 1:09 am
by vinsashi
in my source file i am getting date columns and for target i should pass previous date for those columns.
ex:
frezdate
10/01/2010
01/03/2010
output:
09/01/2010
27/02/2010
like this i want output just previous date i should load for each record.
Posted: Thu Oct 20, 2011 1:45 am
by prasson_ibm
Hi,
In transformer you can do the derivation in this way:-
DatefromJulianDay(Juliandayfrom date(Input.date)-1))
I think it should work.
Thnaks
Prasoon
Posted: Thu Oct 20, 2011 4:38 am
by deeplind07
I am not sure as i dont have datastage access now, but you can try using 'column_name - 1' directly in trnsformer
Posted: Thu Oct 20, 2011 7:23 am
by chulett
That won't work, I'm afraid.
Another solution - research the use of the DateFromDaysSince function.
Posted: Thu Oct 20, 2011 2:53 pm
by ray.wurlod
TimestampFromSecondsSince() function with an offset of -86400 should also work.