unixtime_milliseconds_todatetime()unixtime_milliseconds_todatetime()
将 unix-epoch 毫秒转换为 UTC 日期/时间。Converts unix-epoch milliseconds to UTC datetime.
语法Syntax
unixtime_milliseconds_todatetime(*milliseconds*)
参数Arguments
- milliseconds:一个实数,表示以毫秒为单位的纪元时间戳。milliseconds : A real number represents epoch timestamp in milliseconds. 在纪元时间 (1970-01-01 00:00:00) 之前发生的
Datetime
的时间戳值为负。Datetime
that occurs before the epoch time (1970-01-01 00:00:00) has a negative timestamp value.
返回Returns
如果转换成功,则结果将为日期/时间值。If the conversion is successful, the result will be a datetime value. 如果转换不成功,则结果将为 null。If conversion is not successful, result will be null.
请参阅See also
- 使用 unixtime_seconds_todatetime() 将 unix-epoch 秒转换为 UTC 日期/时间。Convert unix-epoch seconds to UTC datetime using unixtime_seconds_todatetime().
- 使用 unixtime_microseconds_todatetime() 将 unix-epoch 毫秒转换为 UTC 日期/时间。Convert unix-epoch microseconds to UTC datetime using unixtime_microseconds_todatetime().
- 使用 unixtime_nanoseconds_todatetime() 将 unix-epoch 纳秒转换为 UTC 日期/时间。Convert unix-epoch nanoseconds to UTC datetime using unixtime_nanoseconds_todatetime().
示例Example
print date_time = unixtime_milliseconds_todatetime(1546300800000)
date_timedate_time |
---|
2019-01-01 00:00:00.00000002019-01-01 00:00:00.0000000 |