DATA:lv_timestamp_lol TYPE timestampl. "时间戳(长时间戳)
DATA:lv_ext TYPE string.
DATA:lv_ext1 TYPE char22.
GET TIME STAMP FIELD lv_timestamp_lol.
lv_ext = lv_timestamp_lol.
WRITE:/ '时间戳:',lv_ext.
lv_ext1 = lv_timestamp_lol.
WRITE:/ '时间戳:',lv_ext1.
"时间戳处理-2022-03-03
DATA:ts TYPE tzntstmpl,
output TYPE char50.
GET TIME STAMP FIELD ts.
output = |{ ts TIMESTAMP = ISO TIMEZONE = 'UTC+8 ' }|.
write:/ 'output前:',output.
replace all occurrences of 'T' in output with '' .
replace all occurrences of '-' in output with '' .
replace all occurrences of ':' in output with '' .
replace all occurrences of ',' in output with '.' .
write:/ 'output后:',output.
短时间戳不做处理的:
data: lv_timestamp type timestamp.
get time stamp field lv_timestamp.
WRITE: / lv_timestamp.