1

Is there a way to print date in the below format in both oracle and postgresql

2018-05-18’T’13:30:42.000+0000
Punter Vicky
  • 15,954
  • 56
  • 188
  • 315
  • 4
    Store the values in an appropriate date/time value, use a `DateTimeFormatter` to format the resulting value into a `String` – MadProgrammer May 24 '18 at 20:15
  • Possible duplicate of https://stackoverflow.com/questions/40841489/timezone-date-format-in-oracle – wolφi May 27 '18 at 00:45

1 Answers1

2
SELECT to_char(systimestamp,'YYYY-MM-DD"''T''"HH24:MI:SS.FF3TZHTZM') FROM dual;

returns

2018-05-27'T'02:45:22.152+0200
wolφi
  • 8,091
  • 2
  • 35
  • 64