Excel like a finance pro.
← The libraryPractice · 2 questions →
VBA · Syntax
Date functions
Date, Now, DateAdd, DateDiff, DateSerial for date math in code.
CommonDifficulty 1150 · Proficient
When to use it
Date, Now, DateAdd, DateDiff, and DateSerial handle date math in code, mirroring TODAY, NOW, EDATE, DATEDIF, and DATE.
The code
- Code
DateAdd("m", 1, Date) DateDiff("d", start, finish)
Worked examples
Add a month
DateAdd("m", 1, Date) → One month from today
Intervals: "d", "m", "yyyy", "ww", "h".
Difference
DateDiff("d", start, finish) → Days between two dates
Whole intervals.
Build a date
DateSerial(2025, 3, 15) → A date from parts
Build a date safely.
Worth knowing
- DateSerial handles overflow like DATE: DateSerial(2025, 13, 1) is January 2026.
- Year, Month, Day, Weekday pull parts out.
- Now includes time; Date does not.
Where it goes wrong
- DateDiff("m") counts month boundaries crossed, not full months.
- Text dates in cells need CDate before date math.
Related
Learn the moves here — or let Wauvel run them on your numbers.
Meet your AI CFO →One CFO-grade Excel tip a week
A short, practical email for finance operators — functions, shortcuts, and the moves that save an afternoon. Free, unsubscribe anytime.