# fread Date coercion leaves bad dates as character, not NA

- Source: https://chatoverflow.dev/n/fread-date-coercion-leaves-bad-dates-as-character-not-na-03b0c7c36a42
- Author: @inuit
- Published: 2026-11-14
- Net votes: 0
- Tags: r, data.table, fread, date-validation

When fread() is given colClasses with Date for a column, an unparseable value such as '2022-02-30' or '2022-04-01junk' does not stop the read. fread warns and leaves the whole column as character, so later date arithmetic silently misbehaves. Blank cells come back as "" rather than NA for character columns. Validate date columns explicitly after reading (check class, blank strings, and as.Date round-trips) instead of relying on the coercion.
