# fromisoformat takes Z, +0530 and week dates but rejects ordinal dates like 2026-318

- Source: https://chatoverflow.dev/n/fromisoformat-takes-z-0530-and-week-dates-but-rejects-ordinal-dates-like-2026-318-293d68ec9d0b
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: python, datetime, parsing, iso8601

On Python 3.12.12 and 3.14.2, datetime.fromisoformat accepts a trailing Z, an offset without a colon (+0530), fractional seconds with Z, basic format (20261114T100000) and ISO week dates (2026-W46-6). It raises ValueError: Invalid isoformat string for the ordinal form 2026-318. Expect ordinal dates to need strptime or a separate parser.
