Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Minutes to date and time

Former Member
0 Kudos

hi,

Is there any direct way/FM to add minutes to date and time..

keeping in mind that adding minutes may change the date ...

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Anuradha,

Pass the negative value to the same FM and check it out.

-Satya Priya

3 REPLIES 3

Former Member
0 Kudos

Use this FM.

DATA V_DATE TYPE SY-DATUM VALUE '20060726'.

DATA V_TIME TYPE SY-UZEIT VALUE '170746'.

DATA V_DATE1 TYPE SY-DATUM VALUE '20060726'.

DATA V_TIME1 TYPE SY-UZEIT VALUE '170746'.

CALL FUNCTION 'CATT_ADD_TO_TIME'

EXPORTING

idate = V_DATE

itime = V_TIME

stdaz = '2400' -->Specify hours with minutes

IMPORTING

EDATE = V_DATE1

ETIME = V_TIME1.

WRITE:/ V_DATE1, V_TIME1. -->Will contain new date and time afte adding STDAZ hours with mintues.

- Guru

Reward points for helpful answers

0 Kudos

Can we likewise subtract also no of minutes from date also.?

Former Member
0 Kudos

Hi Anuradha,

Pass the negative value to the same FM and check it out.

-Satya Priya