Ever worked with dates and times in #Python?
-
Ever worked with dates and times in #Python?
strptime, stftime, %m, %M, %H, %I, ... what is this all about?
Here's a quick explainer of parsing and formatting dates/times, a table of common formats, and links to other cheat sheets and tools to help with datetime conversion tasks.
Also a tip that many experienced Python devs often overlook:
f-strings support datetime format codes! -
Marijke Luttekesreplied to Trey Hunner 🐍 last edited by
@treyhunner It's so nice that the formatting symbols are largely the same as PHP's, so if you understand one, you understand the other.
Copyright © 2024 NodeBB | Contributors