Page 1 of 1

Issue with date and timestamp

Posted: Mon Mar 09, 2009 6:48 am
by hari4dsx
Hi,

We are using the following function to populate date with corresponding timestamp in one of the fields

"Oconv(Date(),"DYMD"):Oconv(@TIME,"MTS")"

The function gives correct results but for a job whose execution started at 11:55 PM on 3rd March and ended at 12:05 AM 4th Mar, we got the following two values as the Last_Update_Date:
11:55:06PM 03-Mar-2009 and
11:55:06PM 04-Mar-2009

The first value is correct but the second value is wrong.

Can any body please explain as why are we facing this issue and what could be the potential solution?

Thanks a lot in advance.

Posted: Mon Mar 09, 2009 6:55 am
by Sainath.Srinivasan
Try Time() instead of @Time

Posted: Mon Mar 09, 2009 3:03 pm
by ray.wurlod
The reason behind Sainath's suggestion is that @TIME is set when the job starts, whereas Time() captures the system clock value at the moment it is invoked.