我们如何在PostgreSQL中转换给定的日期时间格式?

问题描述 投票:-1回答:1

我有一个日期时间列,其格式如下:

2019-11-10-07.10.55.865000

我希望我的格式如下:

2019-11-10 07:10:55.865000

如何在PostgreSQL 9.6.11中做到这一点?

postgresql datetime postgresql-9.6 format-conversion
1个回答
0
投票

有“ to_char(时间戳,文本)功能(“ to_char(当前时间戳,'HH12:MI:SS')”)。]

https://www.postgresql.org/docs/8.2/functions-formatting.html

© www.soinside.com 2019 - 2024. All rights reserved.