on 06-17-2009 8:24 AM
Hi All,
I want to increment the 15 digit timestamp say 20090603093000 in abap code or 20.090.603.093.000 as in table which is taken has year 2009 month 06 june, date 03,hour 09,minute 30 and second 00 by a hour each time in a loop and then search in a table whether that timestamp has an entry in a table.I want to know how I can increment this timestamp. If anyone has worked on it or have any idea about it, please guide me.
Thanks and regards,
Kavya k
Hi Kavya,
This can be done using methods of BASIS class(APIs) cl_abap_tstmp. There are methods like SUBTRACTSECS to subsbract seconds from timestamp, TD_ADD to add seconds to date & time.
Using these if you want to add seconds to DATE & TIME, convert first it into timstamp(using apis of same class), use those methods to add seconds and then convert timestamp back to date & time. This way any of these kind can be solved.
Regards,
Manne.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This question is not appropriate for the WDA forum. There is nothing WDA specific about. In the future please place such questions into the ABAP General forum.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi kAVYA,
Please use the function module TIMESTAMP_DURATION_ADD to increment the timestamp.
regards,
Anil kumar G
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.