Timestamp format on row_to_json Timestamp format on row_to_json json json

Timestamp format on row_to_json


There is no way to influence the format used by row_to_json.

You could define a view on your table and use

to_char(row_added_dttm, 'YYYY-MM-DD"T"HH24:MI:SS.MS"Z"')

to format the timestamp as a string.

Then you can use row_to_json on that view to get your desired result.