← 30 Days Excel Series
Day 16 of 30IntermediateFormulas

Day 16: Date & Time Functions

5 questions · Excel Interview Preparation

Q1

What are the key date functions in Excel and what do they return?

TODAY() returns today's date (updates daily). NOW() returns current date and time. YEAR(date), MONTH(date), DAY(date) extract year, month, day as numbers. WEEKDAY(date,2) returns 1=Monday to 7=Sunday (mode 2 is ISO standard). WEEKNUM(date) returns the week number of the year. EOMONTH(date,0) returns the last day of the month. These are the building blocks for all date-based analysis.

💡 Interview tip: EOMONTH(date,0) for last day of month and EOMONTH(date,-1)+1 for first day of month are two formulas every analyst uses constantly.
Q2

How do you calculate the number of working days between two dates?

NETWORKDAYS(start_date, end_date, [holidays]) counts working days (Monday–Friday) between two dates, inclusive of both. An optional holidays range excludes those dates. NETWORKDAYS.INTL allows custom weekend definitions — e.g. for businesses that work on Saturdays: NETWORKDAYS.INTL(start,end,11) where 11 means only Sunday is the weekend. This is commonly used for SLA calculations, delivery time analysis, and project duration.

💡 Interview tip: NETWORKDAYS is frequently asked in interview scenarios involving "calculate average resolution time excluding weekends".
Q3

What is DATEDIF and why is it undocumented?

DATEDIF(start_date, end_date, unit) calculates the difference between two dates in years, months, or days. Units: "Y"=complete years, "M"=complete months, "D"=total days, "YM"=months ignoring years, "MD"=days ignoring months and years. Classic use: =DATEDIF(BirthDate, TODAY(), "Y") calculates exact age in complete years. DATEDIF is intentionally undocumented in Excel (inherited from Lotus 1-2-3) — it works but Microsoft does not officially support it. Use YEARFRAC for year fractions.

💡 Interview tip: DATEDIF is the only reliable formula for "age in complete years" — know it despite being undocumented.
Q4

How do you extract the month name from a date?

Three approaches: (1) =TEXT(A2,"MMMM") returns full month name ("August"). (2) =TEXT(A2,"MMM") returns abbreviated name ("Aug"). (3) =MONTH(A2) returns the month number (8) — use this when you need to sort or calculate, not display. Important: TEXT returns text, so you cannot sort month names alphabetically with TEXT — they sort alphabetically (April, August...) not chronologically. Use MONTH number for sorting, TEXT for display.

💡 Interview tip: Never sort month names as text — always keep a numeric month column for sorting and use TEXT only for display.
Q5

How do you calculate a date that is N business days from today?

WORKDAY(start_date, days, [holidays]) returns a date that is exactly N working days after (positive) or before (negative) the start date. =WORKDAY(TODAY(), 5) returns the date 5 business days from today. =WORKDAY(TODAY(), -10) returns 10 business days ago. WORKDAY.INTL allows custom weekends. Useful for: calculating when a deliverable is due given a business-days SLA, finding the date N days back for reporting windows.

💡 Interview tip: WORKDAY for future/past date calculation; NETWORKDAYS for counting days between two dates — know which does which.
← Day 15All DaysDay 17

Want 1:1 Excel coaching?

Join EVIKA Academy for live Excel training, real projects, and placement support in Delhi NCR.

Book Free Demo →
Best Data Analytics Course in Noida Delhi NCR | EVIKA ACADEMY