Date Functions
Work with dates in Excel — calculate durations, extract components, and build date-driven reports.
✅ What You Will Learn
Excel stores every date as a serial number — January 1, 1900 is 1, January 2 is 2, and so on. This means you can do arithmetic on dates: subtracting two dates gives the number of days between them, and adding a number to a date gives a future date.
Date functions extract components from this serial number (year, month, day) or calculate intervals. The most important date functions for analysts are TODAY, NOW, YEAR, MONTH, DAY, WEEKDAY, DATEDIF, EDATE, and EOMONTH.
Dates imported from external systems are often stored as text — they look like dates but do not behave like them. You will know a date is stored as text if it is left-aligned in the cell (real dates are right-aligned by default) or if subtracting two dates gives an error.
📋 Employee records — date calculations
| Employee | Join Date | Date of Birth | Today | Tenure (Years) | Age |
|---|---|---|---|---|---|
| Rahul Sharma | 15-Mar-2021 | 12-Jun-1995 | =TODAY() | =DATEDIF formula | =DATEDIF formula |
| Anjali Singh | 01-Aug-2019 | 30-Sep-1992 | |||
| Vikas Gupta | 20-Nov-2023 | 15-Jan-1998 |
Syntax
Examples
📌 Key Points to Remember
- ✓Dates are numbers internally — subtracting two dates gives days; adding a number gives a future date
- ✓TODAY() recalculates automatically every time the workbook opens or calculates
- ✓DATEDIF is not in autocomplete — type it manually. Arguments: (start_date, end_date, unit)
- ✓If date subtraction gives a number like 47823 instead of days, format the result cell as "Number" not "Date"
- ✓NETWORKDAYS excludes weekends and optionally a list of holidays — use it for SLA and deadline calculations
🏢 Real-World Application
Operations teams use NETWORKDAYS to calculate SLA breaches — how many working days have elapsed since a ticket was raised. HR uses DATEDIF(DOB, TODAY(), "Y") to calculate employee ages for compliance reporting. Finance teams use EOMONTH to generate month-end cut-off dates for automated reporting triggers.
⚠️ Common Mistakes to Avoid
❓ Frequently Asked Questions
How do I convert a text date like "15-08-2026" to a real Excel date?
Use DATEVALUE("15-08-2026") or =DATE(YEAR,MONTH,DAY) built from MID/LEFT/RIGHT extractions. If dates are consistently formatted, Flash Fill (Ctrl+E) often converts them automatically.
What is the difference between TODAY() and NOW()?
TODAY() returns only the date (no time). NOW() returns the date and time together. Use TODAY() for most date calculations — NOW() is mainly for timestamping when an event was recorded.
How do I count working days between two dates excluding public holidays?
=NETWORKDAYS(start, end, holiday_range) where holiday_range is a list of holiday dates in a column. NETWORKDAYS automatically excludes Saturdays and Sundays plus any dates you list.
✏️ Practice Exercise
Create an employee data table with Name, Join Date (dates in the past), and Date of Birth columns. Using date functions, calculate: (1) Tenure in complete years and months (e.g. "5 years, 3 months"), (2) Current age in years, (3) The exact date their 5-year work anniversary falls on, (4) Number of working days they have been employed.
Learn Excel with Live Trainer Guidance
These tutorials give you the foundations. Our live Excel course at EVIKA Academy, Noida teaches you to build real dashboards on actual business data — with a trainer who uses Excel professionally every day.