Overriding default datetime output format By default, my Postgres database outputs a DateTime in the current format YYYY-MM-DD hh:mm:ss. However, I want to override this and output it in this format YYYY-MM-DDThh:mm:ss with the T in between the date and the time.
Is there a way to override this with any format? I don't want to use to_char or anything similar, I want any DateTime returned by my database to be in that format (or any format I specify) by default.
Thanks
There is no way to do that in PostgreSQL.
The only configuration parameter available is DateStyle, which allows you to choose between a handful of pre-defined output formats.