Page 1 of 1

Date Time manipulation

Posted: Tue Apr 07, 2009 8:40 am
by mydsworld
I have in my input fields such as Update Date and Time. I would like to add 6 hrs 30 min to that to get a new date and time. How to do the transformation.
Thanks.

Posted: Tue Apr 07, 2009 9:33 am
by ray.wurlod
Convert dates to Julian dates. Convert times to seconds from midnight. Do the arithmetic. Convert back to date/time/timestamp.

Posted: Tue Apr 07, 2009 9:51 am
by mfavero
Sometimes Ray isn't too gentle with simple questions. You should really read the Parallel Job Developer Guide. But in this as in many instances the answers are not particularly apparent. Try page 606 under date and time functions. Convert 6 hours 30 min to seconds and use

TimestampFromSecondsSince function

Returns the timestamp from the number of seconds from the base timestamp

args: seconds (dfloat), [base timestamp]
output: timestamp

:twisted:

Posted: Tue Apr 07, 2009 10:14 am
by bollinenik
Hi,
Create a routine and call that to do the caluculation and change into required format.