简体   繁体   English

Netezza-如何将时间戳/日期时间转换为13位UNIX时间毫秒?

[英]Netezza - How to convert timestamp/datetime to 13-digit UNIX time millis?

I have read some reference about Netezza, but I cannot figure out how to convert timestamp/datetime value to 13-digit UNIX time millis. 我已经阅读了有关Netezza的一些参考,但是我无法弄清楚如何将时间戳/日期时间值转换为13位UNIX时间毫秒。

Any suggestion or ideas? 有什么建议或想法吗?

Postgres offers the extract(epoch from . . .) function that does exactly what you want: Postgres提供了extract(epoch from . . .)功能,它可以完全满足您的需求:

select extract(epoch from <datetimecol>) * 1000

This has been in Postgres for a long time, so I would guess that Netezza also supports it. 它已经存在于Postgres中很长时间了,所以我猜Netezza也支持它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM