2010 Jan 18 10:46 AM
My Requirement is that i need to add/subtract hours to current date and current time and then display the same..Incase of time its fine, but for date if goes to the next day i need to add 1 to date.
Example:
Current Time is 11pm
Current Date is 12.03.2010
I want to add 3 hrs
So Time will become 2am
But Date needs to become 13.03.2010
Can anyone suggest any SAP Standard Function modules to do the same?
Thanks and Regards,
Vanessa
My Requirement is that i need to add/subtract hours to current date and current time and then display the same..Incase of time its fine, but for date if goes to the next day i need to add 1 to date.
Example:
Current Time is 11pm
Current Date is 12.03.2010
I want to add 3 hrs
So Time will become 2am
But Date needs to become 13.03.2010
Can anyone suggest any SAP Standard Function modules to do the same?
Thanks and Regards,
Vanessa
2010 Jan 18 10:57 AM
You can check class CL_ABAP_TSTMP method ADD.
Here you can add seconds to the time stamp, so convert to seconds and then add it.
2010 Jan 18 11:13 AM
2010 Jan 18 2:33 PM
Please do not ask date/time questions that have been answered many times before - locked.
Rob
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |