暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

PostgreSQL基础 time 时间类型转换

CentOS 7.6.1810
postgresql 14.4

time 时间类型转换

postgres=# select now(); now ------------------------------- 2022-07-16 16:50:59.583184+08 (1 row) postgres=# select now()::timestamp; now ---------------------------- 2022-07-16 16:51:12.493966 (1 row) postgres=# select now()::timestamp without time zone; now --------------------------- 2022-07-16 16:51:48.41618 (1 row)
postgres=# select now()::date; now ------------ 2022-07-16 (1 row)
postgres=# select now()::time; now ----------------- 16:52:34.782013 (1 row) postgres=# select now()::time with time zone; now -------------------- 16:52:45.270811+08 (1 row)

学习资料


欢迎各位同学一起来交流学习心得!

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

文章被以下合辑收录

评论