NOW
Return the current moment as a date with a time fraction attached.
Syntax
NOW() Examples
Every example below was executed against VisiGrid engine 0.35.0 — not
transcribed from another vendor's documentation. Reproduce any of them with vgrid calc.
| Formula | Result | Notes |
|---|---|---|
=ISNUMBER(NOW()) | TRUE | |
=INT(NOW())=TODAY() | TRUE | The whole part is the date; INT throws away the clock. |
=NOW()>=TODAY() | TRUE | NOW is today plus a fraction of a day. |
=HOUR(NOW())>=0 | TRUE |
NOW is TODAY plus a fraction
One number carries both. The whole part is the date, the fraction is the time —
0.5 is midday, because midday is half a day in.
=INT(NOW()) → today's date, time discarded
=NOW()-TODAY() → the time alone, as a fraction of a day
=(NOW()-TODAY())*24 → hours elapsed since midnight
That is why TODAY and NOW are not interchangeable. A
cell holding NOW() compared against one holding TODAY() will not be equal,
even on the same day, because one has a clock on it.
The comparison that catches people
Testing NOW() = TODAY() is false for all but one instant of the day. If you
mean “is this today”, strip the time first:
=IF(INT(A1)=TODAY(), "today", "not today")
Why these examples assert shapes
NOW() returns a different number every time it runs, so a published result
would be wrong before you finished reading it. The examples check properties
that hold at any moment instead — and the build executes them like all the
others. See TODAY for more on that.
Two of the obvious properties are deliberately not asserted here: NOW() > TODAY() and NOW() <> INT(NOW()) are both false at exactly midnight. True
almost always is not the same as true, and a build that fails once a year at
00:00:00 is worse than one that checks something weaker.
Excel compatibility
Matches Excel. Returns a date serial with the time as its fractional part.