Search Postgresql Archives

Re: Bug on version 12 ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Fri, May 15, 2020 at 9:38 AM PegoraroF10 <marcos@xxxxxxxxxx> wrote:
Ok Tom but then you cannot go back and forth, like this ...

select to_timestamp(jsonb_build_object('mydate',
current_timestamp)->>'mydate', 'YYYY-MM-DD HH24:MI:SS');

From here [1] - there are 2 green boxes on the page marked "Tip" - the second one is of interest here.

Apparently the portable format for your need would be

select to_timestamp('2020-04-02T18:26:50.941531-03:00', 'YYYY-MM-DDtHH24:MI:SS');

That works on both PG 11 and PG 12.

John W Higgins

[1] - https://www.postgresql.org/docs/12/functions-formatting.html 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux