Application Development and Automation 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: 
Read only

Adding Minutes to date and time

Former Member
0 Likes
8,141

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
Read only

Former Member
0 Likes
2,964

Hi Anuradha,

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

-Satya Priya

3 REPLIES 3
Read only

Former Member
0 Likes
2,964

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

Read only

0 Likes
2,964

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

Read only

Former Member
0 Likes
2,965

Hi Anuradha,

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

-Satya Priya