How to specify timezone with current_timestamp in oracle?

by raphael_tillman , in category: MySQL , 24 days ago

How to specify timezone with current_timestamp in oracle?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by hal.littel , 23 days ago

@raphael_tillman 

When using the CURRENT_TIMESTAMP function in Oracle, you can specify the time zone using the AT TIME ZONE clause.


Here is an example of how you can specify a time zone with CURRENT_TIMESTAMP in Oracle:

1
2
SELECT CURRENT_TIMESTAMP AT TIME ZONE 'UTC' AS current_utc_time
FROM dual;


In this example, the AT TIME ZONE 'UTC' clause tells Oracle to return the current timestamp in Coordinated Universal Time (UTC) time zone.


You can replace 'UTC' with any valid time zone abbreviation or region name supported by Oracle.