2007 Aug 10 5:22 AM
Hello,
I have field of length 20 which contains date in the format mm/dd/yyyy hh:mm:ss.
I want to add 5 hrs, 8 hrs, 2 days to this date value depending upon some condition.
Can anyone please suggest how to do this or any FM which does this.
Thanks in advance
Hello,
I have field of length 20 which contains date in the format mm/dd/yyyy hh:mm:ss.
I want to add 5 hrs, 8 hrs, 2 days to this date value depending upon some condition.
Can anyone please suggest how to do this or any FM which does this.
Thanks in advance
2007 Aug 10 5:34 AM
splite into two logic.
hour.
calcu the hour.
24 = 1day.
day.
add that day with result.
2007 Aug 10 5:46 AM
Hi..
DATA : FA(20) TYPE c,
FB(10) TYPE c,
FC TYPE d,
FD(8) TYPE c,
FE TYPE t.
data : f_m(10) type c,
f_d(10) type c,
f_y(10) type c,
f_h(10) type c,
f_mi(10) type c,
f_s(10) type c,
f_aa(10) type c,
f_bb(10) type c.
FA = '07/01/2007 08:09:10'.
SPLIT fa AT space INTO f_aa f_bb.
SPLIT f_aa AT '/' INTO f_m f_d f_y.
SPLIT f_bb AT ':' INTO f_h f_mi f_s.
add your logic...
i want to help you.
regards..
2007 Aug 10 5:51 AM
Hi,
If you want to use FM, then try FM RP_CALC_DATE_IN_INTERVAL.
data: wa_date like sy-datum.
call function 'RP_CALC_DATE_IN_INTERVAL'
exporting
date = sy-datum
days = 13
months = 0
signum = '+'
years = 0
importing
calc_date = wa_date.
write: / wa_date.
<b>Reward points if this helps,</b>
Kiran
2007 Aug 10 5:55 AM