To extract day, month or year from a date, you use the corresponding Excel built in function for each one of these date parts.
- Day: Day(mydate).
- Month: Month(mydate).
- Year: Year(mydate).
Examples:
Suppose you have in cell A1 (formatted as date), the date:15/11/2009 (ddmmyyyy), Then:
- Day(A1) will result in 15
- Month(A1) will result in 11
- Year(A1) will result in 2009
Applies to: Excel 2003