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: 

Subtract minutes from system time

Former Member
0 Kudos

Hi Experts,

I want to subtract 5 min from the system time.

Is there any function module.

Regards,

Chandu

9 REPLIES 9

KK07
Contributor
0 Kudos

hi,

check with this ..............

'TIMESTAMP_DURATION_SUB'

Former Member
0 Kudos

Hi,

Thanks for your reply.

But my requirement is I will pass just system current time.

Based on this it will subtract 5 min from this and stored in another variable.

Regards,

Chandu

Former Member
0 Kudos

Hi,

When you subtract 300 from SY_UZEIT it will subtract 300 seconds from the system time ( SY_UZEIT gives system time ).

This is equivalent to subtracting 5 min.

Regards,

Pramod

Former Member

Hi,

I think u can use SY-UZEIT.

You can declare a local variable W_UZEIT type SY_UZEIT.

and write the code

w_uzeit = sy-uzeit - 300.

Regards,

Pramod.

Former Member
0 Kudos

hai,

use offset concept.

shan.

Former Member
0 Kudos

It isn't possible to modify sy-uzeit, only vars

0 Kudos

Hi Cosmos,

We are not modifying SY-UZEIT...

we are declaring a variable W_UZEIT and assigning the subtracted value.

Regards,

Pramod

former_member598013
Active Contributor
0 Kudos

Hi Chandu,

Use the below statment to subtract 5 minutes:

data: v_time type sy-uzeit.

v_time = sy-uzeit.

v_time = v_time - 300.

This might solve your problem.

Thanks,

Chidanand

Former Member
0 Kudos

"But my requirement is I will pass just system current time."

I apprehended that he want to pass current time with substracted time