Cleaning & transforming data

Dates & times

Serial numbers, parsing, timezones, business days and grouping by month.

Excel stores dates as serial numbers counted from 1900: the cell shows 45292 until it is converted, when it becomes 1 January 2024.Excel stores dates as serial numbers counted from 1900: the cell shows 45292 until it is converted, when it becomes 1 January 2024.Excel stores a date as a day countAB1OrderDate (raw)2A-101452923A-102453234A-10345352to_datetime2024-01-012024-02-012024-03-01

Start with the full guides

The long-form treatment of dates & times, with the reasoning the shorter pages assume.

Step-by-step how-tos

One task each, with code you can copy, run and adapt.

When it breaks

The errors this topic produces, with the cause explained rather than just the fix.

Follow it through a track

Prefer an ordered route? These tracks cover dates & times along the way, in the order that builds on itself.

Related topics

Subjects that keep turning up on the same pages as this one, most overlap first.

Dates & times is part of Cleaning & transforming data.