2013 Dec 09 7:06 AM
Hi,
Is there any function module which displays the timestamp in ISO format, when we have timestamp and time zone?
If it is not there then should we split the timestamp and display it in ISO format or is there any other way.
Please let me know.
Thanks,
Swetha
2013 Dec 09 8:41 AM
Swetha, You could also manually do it like this.
DATA :time_stamp TYPE timestampl,
ts_char(28).
DATA : l_date(10), "like sy-datum,
l_time(12), "like sy-uzeit.
l_mtime(7).
DATA : str TYPE string.
GET TIME STAMP FIELD time_stamp.
ts_char = time_stamp.
SPLIT ts_char AT '.' INTO ts_char l_mtime.
CONVERT TIME STAMP time_stamp TIME ZONE sy-zonlo
INTO DATE l_date TIME l_time.
WRITE : l_date TO l_date USING EDIT MASK '____-__-__' .
WRITE l_time TO l_time USING EDIT MASK '__:__:__.______'.
CONCATENATE l_date l_time into str separated by space.
CONCATENATE str l_mtime INTO str.
write😕 str.
2013 Dec 09 7:16 AM
2013 Dec 09 7:48 AM
Hi Swetha,
Use this statement
CONVERT TIME STAMP lv_utc_timestamp TIME ZONE sy-zonlo
INTO DATE lv_local_date TIME lv_local_time.
2013 Dec 09 8:41 AM
Swetha, You could also manually do it like this.
DATA :time_stamp TYPE timestampl,
ts_char(28).
DATA : l_date(10), "like sy-datum,
l_time(12), "like sy-uzeit.
l_mtime(7).
DATA : str TYPE string.
GET TIME STAMP FIELD time_stamp.
ts_char = time_stamp.
SPLIT ts_char AT '.' INTO ts_char l_mtime.
CONVERT TIME STAMP time_stamp TIME ZONE sy-zonlo
INTO DATE l_date TIME l_time.
WRITE : l_date TO l_date USING EDIT MASK '____-__-__' .
WRITE l_time TO l_time USING EDIT MASK '__:__:__.______'.
CONCATENATE l_date l_time into str separated by space.
CONCATENATE str l_mtime INTO str.
write😕 str.
2013 Dec 09 9:48 AM
2022 Mar 02 8:58 AM