on 04-22-2008 8:55 AM
Hi,
My requirement is I have to calculate Diference in dates
Like as,
if net date = 12-04-2008 and issue date = 12-03-2008
term Date = net date - issue date
how to calculate term date.
Any idea with some coding.
Award points for good answer.
Hi,
No need for a FM.
Data: days type i.
days = end_date - start_date.
Write:/ days
Or
function module CCU_TIMESTAMP_DIFFERENCE
Regards
Kiran Sure
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use FM 'HR_HK_DIFF_BT_2_DATES'
Regards,
Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You want the difference bewteen two dates as a number of days?
Just use,
DAYS = NET_DATE - ISSUE_DATE.
There are also function modules that will do this, but why bother when it can be done in one line of code.
Regards,
Nick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
U can use FM SD_DATETIME_DIFFERENCE if you need to calculate the diffrence in days between two dates.
CALL FUNCTION 'SD_DATETIME_DIFFERENCE'
EXPORTING
DATE1 = '22.04.2008'
TIME1 = '12:00:00'
DATE2 = '23.04.2008
TIME2 = '12:00:00'
IMPORTING
DATEDIFF = DATEDIFF
TIMEDIFF = TIMEDIFF
EARLIEST = EARLIEST
EXCEPTIONS
INVALID_DATETIME = 1
OTHERS = 2.
I hope it helps.
Thanks,
Vibha
Please mark all the useful answers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.