Cheat?
# select translate(to_char(current_timestamp, '-MM-DD HH:MI:SS.MSOF'),'
','T');
translate
2016-05-10T11:42:20.479-05
(1 row)
Just translate the blank in the result of to_char() to a T.
On Sun, May 8, 2016 at 3:59 AM, Jasim Mohd wrote:
> Is ther
Jasim Mohd wrote:
> Is there any way to format datetime to RFC3339Nano Eg:
> 2006-01-02T15:04:05.9Z07:00 in postgres
> 9.3 or 9.5?
>
> I tried with to_char. But there is no documentation how to handle T, Z,
> +07:00, -07:00 etc.
The best I can get is:
SELECT to_char(current_timestamp,
Is there any way to format datetime to RFC3339Nano Eg:
2006-01-02T15:04:05.9Z07:00 in postgres 9.3 or 9.5?
I tried with to_char. But there is no documentation how to handle T, Z,
+07:00, -07:00 etc.
The nearest one I can reach is
v2=# select to_char(current_timestamp, '-MM-DD HH:MI:S