Free Excel Formula Course / Lesson 4 of 10

Excel Date and Time Formulas

Build dates safely, extract date parts, calculate durations, schedule workdays, and report by week or month.

Lesson 4: Excel stores dates as serial numbers

Dates are numbers formatted to look like calendar dates; times are fractions of a day. Subtracting two dates gives elapsed days. Use DATE to build dates from numeric year, month, and day values instead of joining date text.

If A2 is 2025-01-15 and B2 is 2025-02-01, =B2-A2 returns 17 days. Format the result as Number.

Date and time formula reference

FunctionPurposeExample
DATEBuilds a date from year, month, and day; normalizes overflow.=DATE(2025,2,1) returns 1-Feb-2025.
TODAYReturns the current date; updates on recalculation.=TODAY().
NOWReturns current date and time.=NOW().
YEAR / MONTH / DAYExtracts a component from a date.=MONTH(DATE(2025,2,1)) returns 2.
HOUR / MINUTE / SECONDExtracts a time component.=HOUR(TIME(14,35,20)) returns 14.
DATEVALUEConverts recognized date text to a serial number.=DATEVALUE("1-Feb-2025").
TIMEBuilds a time from hour, minute, second.=TIME(14,30,0) returns 2:30 PM.
TIMEVALUEConverts recognized time text to a serial fraction.=TIMEVALUE("2:30 PM").
DAYSReturns end date minus start date in days.=DAYS(B2,A2).
DATEDIFReturns completed years, months, or days between dates.=DATEDIF(A2,B2,"m") returns complete months. Use a valid ordered date pair.
DAYS360Calculates days using a 360-day financial year.=DAYS360(A2,B2).
YEARFRACReturns the fraction of a year between dates.=YEARFRAC(A2,B2,1) uses actual days/actual year basis.
EDATEMoves a date by whole months.=EDATE(A2,3) is three months later.
EOMONTHReturns the last day of a month offset.=EOMONTH(A2,0) returns the current month's end.
WORKDAYMoves by workdays, excluding weekends and optional holidays.=WORKDAY(A2,10,H2:H10).
NETWORKDAYSCounts workdays between dates.=NETWORKDAYS(A2,B2,H2:H10).
WORKDAY.INTLSchedules workdays with a custom weekend pattern.=WORKDAY.INTL(A2,10,1,H2:H10).
NETWORKDAYS.INTLCounts workdays with a custom weekend pattern.=NETWORKDAYS.INTL(A2,B2,1,H2:H10).
WEEKDAYReturns weekday number using a selected numbering system.=WEEKDAY(A2,2) returns Monday=1 through Sunday=7.
WEEKNUMReturns a week number using a selected week system.=WEEKNUM(A2,2) starts weeks on Monday.
ISOWEEKNUMReturns ISO-8601 week number.=ISOWEEKNUM(A2).
HOUR / MINUTEExtracts clock components for elapsed-time reports.=MINUTE(TIME(14,35,0)) returns 35.
TIMEAdds a fractional-day time to a date.=A2+TIME(8,30,0) adds 8:30 AM.

Find a due date 10 workdays later: =WORKDAY(A2,10,$H$2:$H$10)

Dates that work across locales

Store true date values, not strings such as "01/02/25", which can mean different dates in different regions. Use number formats for display, and pass an explicit weekend code to the .INTL functions when Saturday/Sunday is not the weekend.

Progress stays in this browser.