I have to format a DateTime
which is in UTC based on user settings which include its time zone (CET/IST etc) and time format (24hr/12hr).
I could find CONVERT TIME STAMP
statement which takes only TIME ZONE
as a parameter and does that conversion:
DATA: lv_timestampl TYPE timestampl VALUE '20200219095959.0000000',
lv_date TYPE d,
lv_time TYPE t.
CONVERT TIME STAMP lv_timestampl TIME ZONE sy-zonlo INTO DATE lv_date TIME lv_time.
My objective is to convert this lv_timestampl
based on TimeZone
and TimeFormat
together.
PS: I could just do that -12
manipulation on lv_time
after CONVERT TIME STAMP
statement and append PM/AM
but I am looking for a standard way of doing it.