Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: What defines the output format of a Postgres Timestamp

by kikuchiyo (Hermit)
on Jan 26, 2021 at 09:50 UTC ( [id://11127464]=note: print w/replies, xml ) Need Help??


in reply to What defines the output format of a Postgres Timestamp

See https://www.postgresql.org/docs/12/datatype-datetime.html#DATATYPE-DATETIME-OUTPUT, especially the notes about ISO 8601.

It appears that formatting happens on the server, and you can influence it with the SET datestyle command, but there aren't that many options. If you want some other fancy format, you have to use to_char.

(I'd also like to point out that Postgresql's documentation is exemplary in general: it's well-structured, detailed, searchable, and best, versioned. It's usually the first and last place to look for if you have any questions about Postgresql.)

  • Comment on Re: What defines the output format of a Postgres Timestamp

Replies are listed 'Best First'.
Re^2: What defines the output format of a Postgres Timestamp
by Skeeve (Parson) on Jan 26, 2021 at 12:04 UTC

    Thanks. I already found that.

    Unfortunately ISO8601 and RFC3339 differ a bit. RFC3339 expects a minute part in the UTC offset while ISO8601 can live without it.


    s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
    +.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11127464]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2024-04-16 08:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found