1

我想将日期从

2017-05-11T16:10:00.000+01:00

2017-05-11T16:10:00+01:00

并拥有下一个 ESQL 代码

departureDateTime = 2017-05-11T16:10:00.000+01:00 
DECLARE departureDateTimeWithIncorrectFormat GMTTIMESTAMP 
CAST(departureDateTime AS GMTTIMESTAMP  FORMAT 'IU') ;  
DECLARE timestampFormatted CHARACTER 
CAST(departureDateTimeWithIncorrectFormat AS CHARACTER FORMAT 'YYYY-MM-
dd''T''HH:mm:ssZZZ');

但 timestampFormatted 有价值

2017-05-11T15:10:00+03:00

任何人都可以请我建议我必须做些什么来保留原始时区。?

4

1 回答 1

0

您正在使用 GMT 时间戳。以这种方式尝试演员表:

CAST(departureDateTime AS TIMESTAMP  FORMAT 'IU') ;  
于 2017-04-24T16:39:05.153 回答