0

Query condition is like below:

creation_date >=last_success_run_date

here creation date is coming like sometime PDT(Pacific Daylight Time) or sometime PST (Pacific Standard Time) format.

and last_success_run_date is always GMT format.

So, I want to know if is there any oracle function available which will convert any timezone format to GMT timezone format.

Wernfried Domscheit
  • 54,457
  • 9
  • 76
  • 110
nodev_101
  • 99
  • 10

2 Answers2

0

use new_time() function is used to convert a date from timezone1 to a date in timezone2.

NEW_TIME(date, timezone1, timezone2)

NEW_TIME(date, 'PDT', 'GMT')
Zaynul Abadin Tuhin
  • 31,407
  • 5
  • 33
  • 63
0

Try this one:

FROM_TZ(creation_date, 'America/Los_Angeles') AT TIME ZONE 'UTC'

or

SYS_EXTRACT_UTC(FROM_TZ(creation_date, 'America/Los_Angeles'))

If creation_date is a DATE rather than TIMESTAMP data type then you have to use CAST(creation_date AS TIMESTAMP) since FROM_TZ accepts only only TIMESTAMP datatypes as input value.

Wernfried Domscheit
  • 54,457
  • 9
  • 76
  • 110