Date and time functions

TODAY

Matches all 2 recorded answers

Recorded: 2 workbook cells. A volatile function: the recorded formulas hold it fixed, for example RAND()*0, so these cells show that the call works and not a clock or random value. How we measure this · See the Rust code

Local names in 40 languages
LanguageName in Excel
Arabicاليوم
BulgarianДНЕС
CzechDNES
DanishI DAG
GermanHEUTE
GreekΣΗΜΕΡΑ
English (Australia)TODAY
English (United Kingdom)TODAY
English (United States)TODAY
SpanishHOY
EstonianTODAY
FinnishTODAY
FrenchAUJOURDHUI
Hebrewהיום
CroatianDANAS
HungarianMA
IndonesianHARI INI
ItalianOGGI
JapaneseTODAY
Korean오늘
LithuanianŠIANDIEN
LatvianŠODIEN
NorwegianI DAG
DutchVANDAAG
PolishDZIŚ
Portuguese (Brazil)HOJE
Portuguese (Portugal)HOJE
RomanianASTĂZI
RussianСЕГОДНЯ
SlovakTODAY
SlovenianDANES
Serbian (Latin)TODAY
SwedishI DAG
Thaiวันนี้
TurkishBUGÜN
UkrainianСЬОГОДНІ
VietnameseHÔM NAY
Chinese (Simplified)TODAY
Chinese (Hong Kong)今天
Chinese (Traditional)今天

Names from Microsoft's support site.

What it does

TODAY()

TODAY returns the current date as a whole date serial, with no time component. It reads the host's clock and takes no arguments.

Like NOW, it is not a function in the mathematical sense: it maps nothing to a value that changes. Three facts govern it, and they are the same three, with one difference that turns out to matter.

It is volatile

Here is the difference that matters: TODAY's value is constant for a day, so the volatility is almost always invisible. A TODAY-driven model recalculates constantly and produces the same answer, right up until midnight, when everything changes at once. That combination — expensive and silent, then abruptly different — is why TODAY in a large dependency tree is a well-known performance and reproducibility hazard.

The battery refuses it, correctly

This is worth stating plainly because TODAY looks so much more tractable than NOW — its value is stable for twenty-four hours, so a naive suite could "pass" for a day and then fail. Stability is not determinism.

It carries a formatting hint

TODAY is, with NOW, one of the documented seed examples for the presentation-hint model: the function returns a plain number and the host applies a date format when the formula is entered into a General-formatted cell. The value itself is core; the formatting is host-side adaptation at the worksheet boundary. See the value universe and the call pipeline, stage 4.

Arguments

TODAY() — no arguments. The parentheses are syntax; there is no parameter slot and therefore no Missing marker.

Everything that varies about the result comes from outside the call: the machine's clock and time zone, and the workbook's date system.

Try it

Input cells (optional)

Example: {"B2": 3, "B3": 4}. A1 holds the formula. Other cells need values before a formula can read them.

Enter a formula, then calculate.

Runs locally in your browser with OneCalc. Its answer may differ from Excel. Use English function names and commas between arguments.

Quirks

Result and edge cases

Returns a Number: a whole date serial, with the fractional part zero.

  • Local date, not UTC. The same workbook opened in two time zones can show two different dates for several hours each day.
  • Midnight is a discontinuity, and it is the only interesting moment in the function's behaviour. A recalculation that spans it, or two cells evaluated either side of it, can disagree.
  • Whole-day exactness. Because the result is an integer-valued double, TODAY() is safe for equality comparison against other whole serials in a way NOW is not. This is the practical reason to prefer TODAY whenever the time of day is not wanted: A1 = TODAY() works, A1 = NOW() almost never does.
  • A static date is not this function. Excel's shortcut for entering today's date inserts a literal serial; it looks identical in the cell and never changes.

Errors

TODAY takes no arguments and has no documented error return. Its failure modes are host-level — an unavailable clock, or a system date outside the representable serial range — and are not observable as worksheet error values.

How to implement

Notes for implementers

  1. Inject the clock. A time provider supplied through the execution context is what makes everything around this function testable, even though the function is not. The reference engine declares exactly such a dependency.
  2. Derive TODAY from the same instant as NOW within a recalculation pass. If the two read the clock independently, a pass that spans midnight can produce a TODAY and a NOW that disagree about the date — an inconsistency no formula author can defend against.
  3. Truncate, do not round. TODAY is the whole-day part of the current instant; rounding would make it flip at noon.
  4. Declare volatility so the recalculation engine propagates it.
  5. Record the time zone with any captured observation. A logged TODAY value without its zone is ambiguous for several hours a day.

Rust code

Show the CalcFunc source of this function

Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.

TODAY · 4 lines · calc-func/src/catalogue/dates.rs on GitHub
25 today_fn "TODAY" (0, 0) [] |s, a, sv| {
    let now = now(s)?;
    serial_out(s, Ok(now.floor()))
}

Kernels shared with other functions

Argument and result plumbing

  • out catalogue/kit

No implementation has been published with a Handbook test suite for this function.

Version differences

No comparison between specific Excel builds is recorded here yet. This does not establish that all builds behave alike.

Alternatives

Relationships

  • NOW — the instant-reading sibling. TODAY() is expected to equal INT(NOW()); unverified here and interesting exactly at midnight.
  • DATEDIF — DATEDIF(birthdate, TODAY(), "Y") is the canonical age formula, and the reason TODAY's volatility is tolerated in so many workbooks.
  • DATEVALUE — shares an under-appreciated property: its documented year-omitted rule reads the system clock, making it clock-dependent too, though it is not declared volatile. TODAY is honest about depending on the clock; DATEVALUE is not.
  • DATE — the deterministic constructor. Any formula that can name its date explicitly should, because it then becomes reproducible and testable.
  • Volatile peers — NOW, RAND, RANDBETWEEN, OFFSET, INDIRECT, CELL, INFO.

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents