[Python-3000] format and datetime (original) (raw)
skip at pobox.com skip at pobox.com
Tue Sep 11 05:11:03 CEST 2007
- Previous message: [Python-3000] __format__ and datetime
- Next message: [Python-3000] __format__ and datetime
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Paul> The date and time defaults (which appear to be %Y-%m-%d and
Paul> %H:%M:%s) seem perfectly acceptable, on the other hand.
I would like to see an analog to %S which preserves fractions of a second as the default formatting for time and datetime objects does:
>>> print(now)
2007-09-10 22:07:53.654774
>>> print(now.strftime("%H:%M:%S"))
22:07:53
>>> print(now.time())
22:07:53.654774
Skip
- Previous message: [Python-3000] __format__ and datetime
- Next message: [Python-3000] __format__ and datetime
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]