Elektrine lite

← Feed

@treyhunner@mastodon.social

Post #1065474

2026-04-09 11:03 UTC

Have a date string and want to find the format string needed to parse it? Read more 👉 https://trey.io/l4b84k #Python

Replies (1)

  • @traal@fosstodon.org 2026-04-09 14:24

    @treyhunner as I believe I mentioned the last time you posted this, the best strategy is to use Python 3.11+ and standard ISO 8601 format strings. In that case, the ”fromisoformat()” methods will handle everything for you. 😊 https://docs.python.org/3/library/datetime.html#datetime.datetime.fromisoformat

    Open ##1065484