Spe*_*cer 6 mysql sql postgresql timestamp
基本上我试图将数据库中的日期字段转换为数秒.我在旧的MySQL数据库上使用了UNIX_TIMESTAMP,并且正在寻找PostgreSQL中的等效函数.
提前致谢
a_h*_*ame 15
SELECT extract(epoch FROM your_datetime_column)
FROM your_table
Run Code Online (Sandbox Code Playgroud)
手册中的更多细节:
http://www.postgresql.org/docs/current/static/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT
归档时间: |
|
查看次数: |
6695 次 |
最近记录: |