Excel functions
Date & time functions
Excel stores every date as a whole number and every time as a fraction of a day. Date and time functions build dates (DATE, EDATE, EOMONTH), take them apart (YEAR, MONTH, WEEKDAY), measure the gap between two dates (DATEDIF, NETWORKDAYS) and count working days around weekends and holidays (WORKDAY).
Start with these
DATEBuilds a real Excel date from separate year, month and day numbers, rolling over extra months or days automatically.DATEDIFCounts the complete years, months or days between two dates — the classic way to calculate age or length of service.DAYReturns the day of the month (1 to 31) from a date.EDATEReturns the date that is a given number of months before or after a start date — ideal for contract ends, renewals and due dates.EOMONTHReturns the last day of the month a given number of months before or after a date — perfect for month-end due dates and reports.MONTHReturns the month number (1 for January to 12 for December) from a date.NETWORKDAYSCounts working days (Monday to Friday) between two dates, including both ends and optionally skipping a list of holidays.NOWReturns the current date and time, updating every time the worksheet recalculates.TODAYReturns today's date, updating automatically each day the workbook recalculates.WEEKDAYReturns the day of the week of a date as a number, e.g. 1 = Sunday to 7 = Saturday (the numbering is adjustable).WORKDAYReturns the date a given number of working days before or after a start date, skipping weekends and optional holidays.YEARReturns the four-digit year of a date, from 1900 to 9999.
All 25 date & time functions
- DATEBuilds a real Excel date from separate year, month and day numbers, rolling over extra months or days automatically.
- DATEDIFCounts the complete years, months or days between two dates — the classic way to calculate age or length of service.
- DATEVALUEConverts a date written as text into a real Excel date serial number that you can calculate with.
- DAYReturns the day of the month (1 to 31) from a date.
- DAYSReturns the number of days between two dates (end date minus start date).
- DAYS360Counts days between two dates using a 360-day year (twelve 30-day months), as used in many interest and accounting calculations.
- EDATEReturns the date that is a given number of months before or after a start date — ideal for contract ends, renewals and due dates.
- EOMONTHReturns the last day of the month a given number of months before or after a date — perfect for month-end due dates and reports.
- HOURReturns the hour (0 to 23) from a time or date-time value.
- ISOWEEKNUMReturns the ISO 8601 week number (1–53) of a date, where weeks start on Monday and week 1 contains the year's first Thursday.
- MINUTEReturns the minutes (0 to 59) from a time or date-time value.
- MONTHReturns the month number (1 for January to 12 for December) from a date.
- NETWORKDAYSCounts working days (Monday to Friday) between two dates, including both ends and optionally skipping a list of holidays.
- NETWORKDAYS.INTLCounts working days between two dates with a weekend you choose (e.g. Friday–Saturday or Sunday only) and optional holidays.
- NOWReturns the current date and time, updating every time the worksheet recalculates.
- SECONDReturns the seconds (0 to 59) from a time or date-time value.
- TIMEBuilds a time value from separate hour, minute and second numbers.
- TIMEVALUEConverts a time written as text, such as "2:30 PM" or "18:45", into an Excel time value.
- TODAYReturns today's date, updating automatically each day the workbook recalculates.
- WEEKDAYReturns the day of the week of a date as a number, e.g. 1 = Sunday to 7 = Saturday (the numbering is adjustable).
- WEEKNUMReturns the week number of a date within its year, using a week that starts on Sunday, Monday or another day you choose.
- WORKDAYReturns the date a given number of working days before or after a start date, skipping weekends and optional holidays.
- WORKDAY.INTLReturns a date a number of working days away, with a custom weekend (code or 0/1 mask) and optional holidays.
- YEARReturns the four-digit year of a date, from 1900 to 9999.
- YEARFRACReturns the fraction of a year between two dates, using one of five day-count conventions (30/360, actual/actual, actual/360…).