Turn postgres date representation into ISO 8601 string

前端 未结 5 1439
我在风中等你
我在风中等你 2020-12-14 05:35

I\'m trying to format a Postgres date representation into a ISO 8601 string. I\'m assuming that there is a Postgres function that can do it, but I found the documentation sh

5条回答
  •  自闭症患者
    2020-12-14 06:22

    I think I found a way to do the formatting, but it's not ideal because I'm writing the formatting myself.

    Here is a potential solution:

    SELECT to_char (now()::timestamp at time zone 'UTC', 'YYYY-MM-DD"T"HH24:MI:SS"Z"')
    

提交回复
热议问题