View previous topic :: View next topic
|
Author |
Message |
mohanrazz
New User
Joined: 30 Sep 2008 Posts: 30 Location: India
|
|
|
|
Hi,
Is there any INTRINSIC function to deduct minutes from timestamp.?
One timestamp will be passed to my COBOL program as Parm. In another PARM, i will be recieving a numeric value for MINUTES. I have to reduce this many minutes from the given time stamp. After deducting the minutes, if hour changes, i have to handle that. If time changes i have to handle that also.
For e.g. if timestamp passed to my cobol program is :
ws-in-ts ==> 2008-10-06-00.25.00.000000
If MINUTES to be deducted (passed as parm to my cobol program) is:
ws-in-min ==> 65
After deduction ws-result-ts should be ==> 2008-10-05-11.20.00.000000
similarly - If ws-in-ts ==> 2009-01-01-01.05.00.000000 and ws-in-min is 120, ws-res-ts should be ==> 2008-12-31-11.05.00.000000
Is there any intrinsic function to handle such scenarios? |
|
Back to top |
|
|
mohanrazz
New User
Joined: 30 Sep 2008 Posts: 30 Location: India
|
|
|
|
SORRY..i gave wrong output in results: it should be 24 hour format:
For e.g. if timestamp passed to my cobol program is :
ws-in-ts ==> 2008-10-06-00.25.00.000000
If MINUTES to be deducted (passed as parm to my cobol program) is:
ws-in-min ==> 65
After deduction ws-result-ts should be ==> 2008-10-05-23.20.00.000000
similarly,
If ws-in-ts ==> 2009-01-01-01.05.00.000000 and ws-in-min is 120, ws-res-ts should be ==> 2008-12-31-23.05.00.000000 |
|
Back to top |
|
|
|