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: 

To substarct time from a date

Former Member
0 Kudos

Hi

Can you please suggest a method or function module to subtract time from a date+time.

Eg : substract 10 mints from Feb 02 2007, 00:00:05

Thanks

Shaju

4 REPLIES 4

Former Member
0 Kudos

Hi,

I think the better way is to convert time also in date-time stamp field and then use.

Not sure if it will worl or not, just try once.

Regards,

Atish

Former Member
0 Kudos

hi,

try this Function Module.

SUBTRACT_TIME_FROM_DATE

Former Member
0 Kudos

Try IGN_TIMESTAMP_PLUSMINUS

Backward is for subtracting.

Regards

Neel

Former Member
0 Kudos

Hi shaju,

try this function module...

C14Z_CALC_DATE_TIME

but here you have to convert the time to seconds to add...

to subtract...

put the negetive sign for the number of seconds you want to subtract

Import parameters Value

I_ADD_SECONDS 3,600-

I_UZEIT 00:00:10

I_DATUM 20.04.2008

the result will be

Export parameters Value

E_DATUM 19.04.2008

E_UZEIT 00:00:10