Get the current hour

028 is clearly 15 o'clock, but the query result is 7 o'clock. Why? Because: extract is taken according to time zone 0, so it does not match the hour value of the current system time.

















select extract(hour from cast(systimestamp as timestamp)) "hour" from dual; this statement can get the correct hour.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326367820&siteId=291194637