Bank CSV near midnight: compare explicit offsets to cutoff

Updated · 2 min read

For bank CSV timestamps around midnight, compare offset-qualified instants with an explicitly defined cutoff. A displayed calendar date is not necessarily the same instant in another offset. This method does not establish the bank’s posting-date policy or daylight-saving rules.

Official reference.

The desktop apps export date, description, and amount as CSV. Open CSV in Excel to save an XLSX workbook. Statement support varies: verify the result against your own PDF.

Preserve raw time and define the boundary

Keep the raw timestamp, source date role and documented offset. State the cutoff with an offset and specify whether equality is included. If the timestamp lacks an offset and the source provides no reliable timezone meaning, hold it; assigning your computer’s zone would invent evidence.

Power Query’s DateTimeZone.FromText parses an explicitly qualified value. DateTimeZone.SwitchZone changes its displayed offset while preserving the instant. Normalize both transaction and cutoff to the same offset before comparing. A fixed offset is not a named timezone with historical daylight-saving transitions.

Test both sides of midnight

The existing fixture uses a strictly-before cutoff, with equality excluded:

Raw instantSame instant in UTCBefore 2026-10-01T00:00:00Z?
2026-10-01T00:30:00+02:002026-09-30T22:30:00ZYes
2026-09-30T23:30:00-04:002026-10-01T03:30:00ZNo
2026-10-01T00:00:00Z2026-10-01T00:00:00ZNo; equal boundary
2026-10-01T00:30:00Unresolved without offsetHold

The local calendar date alone would misclassify both first rows. The unknown-offset row is not a fourth successfully normalized instant.

The synthetic cutoff exercise defines a half-open boundary at 2026-10-01T00:00:00Z. 2026-10-01T00:30:00+02:00 is before it, whereas 2026-09-30T23:30:00-04:00 is after it. An instant exactly at the boundary is excluded by the stipulated rule. A timestamp without offset remains unresolved.

Python checks these explicit-offset comparisons; no Power Query execution or bank cutoff verification is implied. Retain raw value, normalized value, cutoff rule and decision together so a reviewer can reconstruct why a row belongs to a particular interval.

If the source is a posting date without time, do not fabricate midnight and treat it as a transaction instant. Use the bank’s documented date semantics and keep this offset calculation separate from missing-year and day/month interpretation covered in the date-and-locale guide.

Related task.

For a PDF-only bank source, download LocalExtract. It processes one PDF locally to date,description,amount CSV; it does not access platform accounts or synchronize accounting records.

Official sources and scope

Documentation checked October 16, 2026. Official reference 1 — pq-zonetext · Official reference 2 — pq-zone

LocalExtract Team

We build LocalExtract, a desktop bank statement converter. Questions or corrections? Contact · Editorial policy

Continue with a related guide