I want to select dates with this format: 2018-11-25T16:00:00Z
So i tried to do this:
select to_char(registration_date, 'YYYY-MM-DDTHH24:MI:SSZ')
from ...
but its output is:
2018-11-01STH24:17:35Z
The char 'T' changes the date output instead of just print it in the middle. I tried to add space next to the char 'T' like this :
select to_char(registration_date, 'YYYY-MM-DDT HH24:MI:SSZ')
and it works, but i need the date without spaces.
How can I add the char 'T' to the middle of the date, and the output will be the same as the first example?