12-10-2008 12:31 PM
Hello,
Can anyone tell me if there is a FM for following example:
Date = 12.12.2008
Time = 19:00:00
I want to add 8 hours to the "Time". The new date and time then should be 13.12.2008 03:00:00.
I've search the forum for some hours but couldn't find a similar example.
Kind rgds,
Patrick
12-10-2008 2:16 PM
12-10-2008 12:36 PM
HI Keltjens,
I dont think you need a FM to do this.
You can directly add 8 Hrs to the time variable. Check if the value is greater than 24:00:00.
If yes, then ADD ONE to your date field and subtract the time variable form 24 to get the correct time as well.
E.G.
Date = 12/12/2008
Time = 19:00:00
Time = 19:00:00 + 08:00:00 = 27:00:00.
IF Time > 24:00:00.
Increment date here.
Subtract time from 24:00:00.
ENDIF.
Hope this helps:)
Best Regards,
Ram.
12-10-2008 12:36 PM
12-10-2008 2:08 PM
12-10-2008 2:16 PM