05-07-2010 3:36 PM
I have a date field called START_DATE defined as type TZNTSTMPL (long date/time format - YYYYMMDDHHMMSS.mmmuuun) and another field call MILLISECONDS also defined as type TZNTSTMPL.
I want to subtract 625 milliseconds from START_DATE, so I put .625 in the MILLISECONDS field and subtract MILLISECONDS from START_DATE.
The starting value in START_DATE is "20090701095000.5410000". After I subtract MILLISECONDS from START_DATE the result is "20090701094999.9160000".
The result should have been "20090701094959.9160000. The problem is with SS (Seconds) 99 is invalid.
How can I get it to subtract correctly?
Are there any ADD or SUBTRACT functions that work with the long date/time format?
Regards,
Mike...
05-07-2010 4:49 PM
Hi,
Can you check class cl_abap_tstmp method subtractsecs and SUBTRACT?
Regards,
Vinod.
05-07-2010 4:49 PM
Hi,
Can you check class cl_abap_tstmp method subtractsecs and SUBTRACT?
Regards,
Vinod.
05-07-2010 9:16 PM
Vindo,
Thanks that is exactly what I was looking for. It handled the adding and subtract from the long date format correctly.
Regards,
Mike...