← Guides

Working with Dates in Excel: Age, Deadlines, Working Days and Month-End

The date formulas office workers need every week, why Excel stores dates as numbers, and how to avoid the US/European format trap.

Excel · 7 min read

By the FormulAI editorial team · Reviewed October 2026

How Excel stores dates

Excel stores a date as a serial number: 1 is 1 January 1900, and 46000 is in 2025. Time is the decimal part (0.5 = noon). This is why subtracting two dates gives a number of days, and why a date pasted as text (left-aligned in the cell) breaks every calculation. Use ISNUMBER(A2) to check: TRUE means a real date.

Age and seniority

DATEDIF is undocumented but present in every version. It returns complete years, months or days between two dates, which is exactly what HR needs for age or seniority.

=DATEDIF(B2;TODAY();"Y") & " years " & DATEDIF(B2;TODAY();"YM") & " months"

Working days and deadlines

NETWORKDAYS counts business days between two dates, and WORKDAY adds business days to a start date. Pass a range of public holidays as the last argument so the result matches your real calendar. For countries with a Friday–Saturday weekend, use NETWORKDAYS.INTL with weekend code 7.

=WORKDAY(A2;10;Holidays!A:A)

Month-end, quarters and grouping

EOMONTH(A2;0) returns the last day of the month, ideal for payment terms such as "30 days end of month": EOMONTH(A2;0)+30. To group by month in a report, use TEXT(A2;"yyyy-mm") as a sortable key, and =ROUNDUP(MONTH(A2)/3;0) for the quarter.

Converting text to real dates

When an export gives "2025-03-14" or "14/03/2025" as text, DATEVALUE depends on your regional settings and may swap day and month. Rebuild the date explicitly with DATE and text functions instead; the result is identical on every computer.

=DATE(RIGHT(A2;4);MID(A2;4;2);LEFT(A2;2))

How this guide was made

Every formula, query and script in this guide was run on a real sample file (Excel 365, Google Sheets, PostgreSQL, MySQL or Python 3) before publication. We document the edge cases we hit during testing, such as text-formatted numbers, empty months or NULL values. AI helps us draft and translate; a human checks each example and updates the guide when software versions change. Spotted an error? Write to contact@formulai-app.com.