I am receiving the input date as below.
2022-05-05 18:08:13.311951 +0:00
And I am trying to convert this to below format which follows ISO8601 format.
2022-05-05T18:08:13.311951+00:00
Is there a way in JS we can implement this logic. I know the equivalent sql query which is like below to achieve it but confused on the js to achieve same.
select to_char(CREATE_DT,'YYYY-MM-DD"T"hh24:mi:sstzh:tzm') CREATE_DT from TABLE_NAME;