-
Book Overview & Buying
-
Table Of Contents
Developing Robust Date and Time Oriented Applications in Oracle Cloud
By :
The EXTRACT function of the Oracle DBS is used to access only one element from the DATE or TIMESTAMP value. It can extract date elements (day, month, and year) that both the DATE and TIMESTAMP values can apply to. Time elements (hour, minute, and second) and time zone extensions (timezone_hour, timezone_minute, timezone_region, and timezone_abbreviation) can be applied only to TIMESTAMP values. Even in the Oracle Cloud 21c release version, time elements cannot be obtained by the EXTRACT function for DATE. So, in this specific situation, DATE values cannot be implicitly converted to TIMESTAMP. The syntax is as follows:
EXTRACT <field> FROM <source>
Here, the field value of EXTRACT can be day, month, year, hour, minute, second, timezone_hour, timezone_minute, timezone_region, or timezone_abbreviation. The following select statements express the principles by taking day and hour elements from the provided values:
select EXTRACT(day...