DAY, MONTH, YEAR

Function Reference: DAY, MONTH and YEAR

Syntax
=DAY(serial_number)
=MONTH(serial_number)
=YEAR(serial_number)
Purpose / Description
These functions return the day of the month (DAY), month of the calendar (MONTH) and calendar year (YEAR) in which a given serial date number or serial date and time number occurs.
Arguments
Name Type Description
serial_number number A constant, reference or nested expression which provides the serial date number for which the calculation is to be undertaken.  Any decimal portion, assumed to represent time of day, is ignored.
Return Values
Type Specific Value Description
number   For DAY: the day of the month on which the integer portion of serial_number occurs.
For MONTH, the calendar month number in which the integer portion of serial_number occurs.
For YEAR, the calendar year in which the integer portion of serial_number occurs.
Numbers returned are always whole number values.
error #VALUE! If serial_number is not a number and cannot be coerced to a number.
error #NUM! If the value of serial_number is a number outside the range allowed
1900 date system: 0 to 2,958,465
1904 date system: 0 to 2,957,003
error   Any errors referenced by arguments are returned due to propagation of error values.
Notes / Comments / Advice / Warnings
Examples: Open / download sample workbook: DAY, MONTH, YEAR.xlsx