Locked lesson.
About this lesson
Learn to work with the EOMONTH and EDATE functions that easily shift dates from one month or year to another.
Exercise files
Download this lesson’s related exercise files.
Temporal Functions.xlsx14.3 KB Temporal Functions - Solution.xlsx
14.5 KB
Quick reference
Topic
Temporal functions.
Description
Working with the EOMONTH and EDATE functions that shift dates easily from one month or year to another.
Where/when to use the technique
The functions are extremely useful and easy to use when you need to return either a date from a different month or year, or when you need to determine the end of a given month.
Instructions
EOMONTH
- Returns the end of the specified month
=EOMONTH(A1,-1) |
Returns the end of the month previous to the date in A1 |
=EOMONTH(A1,0) |
Returns the end of the month for the date in A1 |
=EOMONTH(A1,1) |
Returns the end of the month after the date in A1 |
- The negative and positive month offsets can be as high as you wish (12 is a full year, 24 is 2 years, etc.)
EDATE
- Returns the same day in the specified month
- Is Feb 28/Feb 29 aware
=EDATE(A1,-1) |
Returns the same day for the month previous to the date in A1 |
=EDATE(A1,0) |
Returns the date in A1 (the day offset by 0 months) |
=EDATE(A1,1) |
Returns the same day for the month after the date in A1 |
- The negative and positive month offsets can be as high as you wish (12 is a full year, 24 is 2 years, etc.)
Lesson notes are only available for subscribers.