Below are two functions that can be used to extract the month from a date in Oracle Database.
date functions
WEEKDAY() vs DAYOFWEEK() in MariaDB: What’s the Difference?
MariaDB provides a WEEKDAY() function and a DAYOFWEEK() function, both of which return the day of the week, represented as a number.
But the number returned is different between these functions.
This post looks at the difference.
2 Ways to Get the Day from a Date in Oracle
Below are two functions that can be used to return the day from a date in Oracle Database.
Oracle Datetime Functions (Full List)
Below is a full list of datetime functions available in Oracle Database.
TRUNC(date) Function in Oracle
In Oracle Database, the TRUNC(date) function returns the given date value with the time portion of the day truncated to the unit provided in the specified format model.
Oracle also has a TRUNC(number) syntax, which is used on numbers. This article is solely about the TRUNC(date) syntax, which is used on dates.
TO_YMINTERVAL() Function in Oracle
In Oracle Database, the TO_YMINTERVAL() function converts its argument to a value of INTERVAL MONTH TO YEAR data type.
SYS_EXTRACT_UTC() Function in Oracle
In Oracle Database, the SYS_EXTRACT_UTC() function extracts the UTC (Coordinated Universal Time) from a datetime value with time zone offset or time zone region name.
TO_TIMESTAMP() Function in Oracle
In Oracle Database, the TO_TIMESTAMP() function converts its argument to a value of TIMESTAMP data type.
TO_TIMESTAMP_TZ() Function in Oracle
In Oracle Database, the TO_TIMESTAMP_TZ() function converts its argument to a value of TIMESTAMP WITH TIME ZONE data type.
TO_DSINTERVAL() Function in Oracle
In Oracle Database, the TO_DSINTERVAL() function converts its argument to a value of INTERVAL DAY TO SECOND data type.