Jasim Mohd wrote:
> Is there any way to format datetime to RFC3339Nano Eg: 2006-01-02T15:04:05.999999999Z07: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, 'FXYYYY-MM-DD"T"HH:MI:SS.US"000Z"OF');
but it will suppress the minute part of the time zone offset if it is 0.
I don't think you can get nanosecond precision in PostgreSQL.
Is that good enough?
Yours,
Laurenz Albe