For more details about changing the date format, please see Creating a custom date format in Excel.
Suppose, you have a list of numbers (1 through 12) in your Excel worksheet that you want to convert to month names.
So, if you plan to perform some further calculations or use the returned numbers in other formulas, you'd better stick with the Excel MONTH function.
The following screenshot demonstrates the results returned by all of the above formulas.
3) Moving the above solution to a function Instead of writing the above select query again and again we can create a function around this select query and we can use this function as and when required.
Now as we know that a function returns only a single row or a cursor or a data type.
If you want the number of months occurring regardless of the day of the month then continue reading. Case 1 – both dates occur in the same year Use the MONTH function to extract the month from each date, then subtract the two months from each other.
If you want to calculate ‘whole month intervals’ by considering the day of the month, then check this post. Example (using format:dd/mm/yyyy): Suppose you have the date 25/09/2007 in cell A1 and the date 31/12/2007 in cell B1 (both cells formatted as date).
Second way to get the output from a plsql table is by using CAST function which convert one data type to other.
The tutorial explains the nuts and bolts of Excel MONTH and EOMONTH functions.
For example: - returns the number of the current month.
At first sight, the Excel MONTH function may look plain.
With this function, we can query the PLSQL tables just like normal tables.