12-24-2013 5:01 AM
Hi All,
I have requirement where in the user enters the a number 14400 which is in minutes.
I am looking at function module which can convert the Number 14400 into date format.
I tried the following
M = I_MIN. = 14400 Mins
S = I_MIN * 60. = 86400 Sec
H = M DIV 60. = 240 Hrs
D = H DIV 24. = 10 Days
but could not convert the Days into date format. Any idea how to proceed.
with rgds
Ranjith Singh.
12-24-2013 5:44 AM
Hi Ranjith,
Calculate the no of days using the same logic. Use the following FM to add days to your start date.
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
date = '20131224'
days = 10
months = 0
* SIGNUM = '+'
years = 0
IMPORTING
CALC_DATE = lv_date2
.
Hope this will help you.
Regards,
Anoop
12-24-2013 5:09 AM
hi,
you must have a start date right?? it is from start of the month or the start date is a fixed date ??
You can use FM HR_99S_DATE_PLUS_TIME_UNIT , it FM Add months(M)/days(D)/years(Y) to given date to get the future date.
refer the link which contains all the FM name about date process : Function Module related on Date calculations - ABAP Development - SCN Wiki
12-24-2013 5:44 AM
Hi Ranjith,
Calculate the no of days using the same logic. Use the following FM to add days to your start date.
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
date = '20131224'
days = 10
months = 0
* SIGNUM = '+'
years = 0
IMPORTING
CALC_DATE = lv_date2
.
Hope this will help you.
Regards,
Anoop
12-24-2013 5:54 AM
Hi Ranjith
First of out of the minutes you can derive days but what is beginning date wrt to which you want to calculate date?
Nabheet
12-24-2013 6:12 AM