今天写报表时遇到一个 TSEGTIMTST 类型的时间格式,存放的是格尼威治时间(UTC).
SPAN {
font-family: "Fixedsys";
font-size: 10pt;
color: #000000;
background: #FFFFFF;
}
.L0S52 {
color: #0000FF;
}
.L0S55 {
color: #800080;
}
GET TIME STAMP FIELD .
下面是将本地日期 时间 时区转换成UTC时间.
CONVERT DATE date TIME time
INTO TIME STAMP time_st TIME ZONE shiqu.
下面是将UTC时间 时区转换成本地日期 时间.
CONVERT TIME STAMP time_st TIME ZONE shiqu
INTO DATE odate TIME otime.
CALL FUNCTION 'TZON_GET_USER_TIMEZONE'
EXPORTING
if_username = sy-uname
IMPORTING
ef_timezone = le_tz
EXCEPTIONS
no_timezone_customizing = 1
no_valid_user = 2
OTHERS = 3.
阅读(6590) | 评论(0) | 转发(0) |