首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在postgres中获取当前毫秒

问在postgres中获取当前毫秒
EN

Database Administration用户
提问于 2015-04-08 14:02:20
回答 1查看 4.4K关注 0票数 -2

我正在应用程序中处理时间戳/日期时间。我在用postgres分局。在postgres中获取当前毫秒(大约1412706599000毫秒)的方法是什么?

EN

回答 1

Database Administration用户

发布于 2015-04-08 14:07:40

代码语言:javascript
复制
select extract(epoch from current_timestamp) * 1000;

手册中的更多细节:

http://www.postgresql.org/docs/current/static/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT

票数 4
EN
页面原文内容由Database Administration提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://dba.stackexchange.com/questions/97301

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档