To calculate Yesterdays date(Timestamp).

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Subhasree
Participant
Posts: 11
Joined: Fri Jul 27, 2007 12:12 am

To calculate Yesterdays date(Timestamp).

Post by Subhasree »

Hi all,

Is there any function that can be used to calculate Yesterday's date of datatype Timestamp?

I tried giving CurrentTimestamp()-1 but when i compiled it shows the error as :

"Invalid conversion requested from a dfloat to a timestamp".

Actually i have to give constraint in the transformer as "X >= 'yesterday's date" where the column X is of datatype timestamp.
And also there is no iconv,oconv fucion in Parrallel Jobs.

Please help me in this regard.

Thanks in advance.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Explore the DateFromDaysSince() function.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
niranjansigeni
Participant
Posts: 7
Joined: Sat Sep 09, 2006 7:01 pm
Location: Jersey

Re: To calculate Yesterdays date(Timestamp).

Post by niranjansigeni »

Try this

In transfomer, in the column defination

DateFromJulianDay(JulianDayFromDate(CurrentDate)-1)


Thanks


Subhasree wrote:Hi all,

Is there any function that can be used to calculate Yesterday's date of datatype Timestamp?

I tried giving CurrentTimestamp()-1 but when i compiled it shows the error as :

"Invalid conversion requested from a dfloat to a timestamp".

Actually i have to give constraint in the transformer as "X >= 'yesterday's date" where the column X is of datatype timestamp.
And also there is no iconv,oconv fucion in Parrallel Jobs.

Please help me in this regard.

Thanks in advance.
niranjansigeni
Participant
Posts: 7
Joined: Sat Sep 09, 2006 7:01 pm
Location: Jersey

Re: To calculate Yesterdays date(Timestamp).

Post by niranjansigeni »

Try this

In transfomer, in the column defination

DateFromJulianDay(JulianDayFromDate(CurrentDate)-1)


Thanks


Subhasree wrote:Hi all,

Is there any function that can be used to calculate Yesterday's date of datatype Timestamp?

I tried giving CurrentTimestamp()-1 but when i compiled it shows the error as :

"Invalid conversion requested from a dfloat to a timestamp".

Actually i have to give constraint in the transformer as "X >= 'yesterday's date" where the column X is of datatype timestamp.
And also there is no iconv,oconv fucion in Parrallel Jobs.

Please help me in this regard.

Thanks in advance.
niranjansigeni
Participant
Posts: 7
Joined: Sat Sep 09, 2006 7:01 pm
Location: Jersey

Re: To calculate Yesterdays date(Timestamp).

Post by niranjansigeni »

Try this

In transfomer, in the column defination

DateFromJulianDay(JulianDayFromDate(CurrentDate)-1)


Thanks


Subhasree wrote:Hi all,

Is there any function that can be used to calculate Yesterday's date of datatype Timestamp?

I tried giving CurrentTimestamp()-1 but when i compiled it shows the error as :

"Invalid conversion requested from a dfloat to a timestamp".

Actually i have to give constraint in the transformer as "X >= 'yesterday's date" where the column X is of datatype timestamp.
And also there is no iconv,oconv fucion in Parrallel Jobs.

Please help me in this regard.

Thanks in advance.
Post Reply