Data with Duke • Data With Duke

Watch the video on YouTube

Watch the video


Show Notes (summarised by AI)

Date & Time Functions in Spreadsheets

Google Sheets, Excel, and friends

Dates in spreadsheets look friendly. Reassuring. Familiar. They are none of those things.

In this lesson, we unpack one of the most important (and most misunderstood) spreadsheet concepts: dates and times are just numbers in disguise.

Dates are serial numbers (wearing a convincing costume)

When you enter a date like 9 February 2026, it looks like a date — but behind the scenes it’s actually a serial number. Each day increments by 1, starting from a fixed origin date defined by the spreadsheet system.

That’s why:

One day earlier = one less in the serial value.

This matters because once dates are numbers, you can do maths with them:

Powerful… but dangerous if you don’t know what’s happening underneath.

Time is the decimal part

Times work the same way — just as fractions of a day:

So:

This is why:

TODAY() vs NOW() — and why NOW() bites people

But here’s the catch: NOW() recalculates every time the sheet changes.

That means it’s not a safe timestamp unless you deliberately freeze it. We’ll deal with that properly in a later lesson — but for now, caution is advised.

Building dates properly with DATE()

Instead of typing dates manually, you can (and often should) build them explicitly:

=DATE(2025, 1, 31)

Why this matters:

You can also rebuild dates from components:

Extracting parts of a date or time

Once you have a proper date/time value, you can extract:

These all work because the underlying value is still numeric.

Formatting dates as text (and the big warning)

Using formatting codes (like TEXT()), you can control exactly how a date appears:

You can even build fully custom formats:

Saturday, 05 November 1955 - 10:04

But once you do this…

⚠️ It is no longer a date. ⚠️ It is now text.

You cannot:

We’ll deal with error handling later — for now, just remember:

Formatting changes how it looks, not what it is — until you convert it to text.

Key takeaways

Have a play. Break things safely. And keep an eye out for the next lesson.

— Duke