convert between date time into timestamp
You can use any of these three options to the functions to convert between date, time and timestamp.
- Use CL_ABAP_TSTMP.
- Use CONVERT_INTO_TIMESTAMP
- Use the following keycode
data lv_tz type ttzz-tzone value is initial.
data lv_ts type xsddatetime_z.
data lv_date type sy-datum .
data lv_time type sy-uzeit.
convert date sy-datum time sy-uzeit
into time stamp lv_ts time zone lv_tz .
convert time stamp lv_ts time zone lv_tz
into date lv_date time lv_time .
You may also like
- date/time operations with CL_ABAP_TSTMP class
In convert between date time into timestamp post, i tried to explain how to convert ABAP time/date format to ABAP timestamp format. One of the methods i have mentioned in that post was […]
- timestamp field with search help and conversion input
There are tables which holds timestamp data instead of date and time seperately. In order to query these tables you have to define timestamp fields in your screens. While defining these […]
- convert ABAP internal table into XML format
XML is a very commonly used data format in ABAP development. There are many utility classes, programs and function modules to operate with XML data format. However the most critical one […]