Raj*_*mar -1 postgresql timestamp datetime date time
我正在我的应用程序中处理时间戳/日期时间。我正在使用 postgres 数据库。在 postgres 中获取当前毫秒(例如 1412706599000)的方法是什么?
小智 5
select extract(epoch from current_timestamp) * 1000;
Run Code Online (Sandbox Code Playgroud)
手册中的更多详细信息:
http://www.postgresql.org/docs/current/static/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT
| 归档时间: |
|
| 查看次数: |
4988 次 |
| 最近记录: |