I have a date column in this format "03-FEB-16" in a database table. I want to query the database to get UTC format equivalent of that date value:
This is the UTC format I am looking for "2015-12-17T14:30:33Z"
I have a date column in this format "03-FEB-16" in a database table. I want to query the database to get UTC format equivalent of that date value:
This is the UTC format I am looking for "2015-12-17T14:30:33Z"
I think I found my answer but Please feel free to post alternative ways to do it.
The following query did the trick:
select to_char(sysdate,'YYYY-MM-DD')||'T'||to_char(sysdate,'HH24:MI:SS')||'Z' from dual
select to_char(sysdate,'YYYY-MM-DD"T"HH24:MI:SS"Z"') from dual. However, this is only correct if your database server OS runs on UTC time zone.