I have two timestamps and i want to compare them in a PX job. I think there is no inbuilt routine for this kind of comparison. Has any one implemented this, if yes then can i have the code and the steps to use it?
Rajesh
Comparing timestamps in a PX job
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 24
- Joined: Sat Oct 15, 2005 1:09 pm
Comparing timestamps in a PX job
Regards,
Rajesh
Rajesh
Rajesh,
start at Page B-1 of the Parallel Job Developer's Guide and look at the various date functions. Convert your two dates into numeric values using any one of the methods and you have a method of comparing them.
start at Page B-1 of the Parallel Job Developer's Guide and look at the various date functions. Convert your two dates into numeric values using any one of the methods and you have a method of comparing them.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
And here is one
Code: Select all
SecondsSinceFromTimestamp
Returns the number of seconds between two timestamps in seconds.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Hi I have used this in My job but this function is returning 0 always. i used a stage variable with Integer 1 to capture the result.kumar_s wrote:And here is oneCode: Select all
SecondsSinceFromTimestamp Returns the number of seconds between two timestamps in seconds.
can let me know how to get the proper difference between 2 timestamps?
Thanks
Naren
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
Re: Comparing timestamps in a PX job
As noted, you can compare dates or timestamps directly.
Date1=Date2
or
Timestamp1=Timestamp2
If they are different you will get the Status:0
If they are same you will get the Status:1
Rajesh_kr82 wrote:I have two timestamps and i want to compare them in a PX job.
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>