Message219366
In browsing the documentation for datetime.datetime:
https://docs.python.org/2/library/datetime.html
It states that the datetime.datetime.microseconds returns the number of microseconds but in trying (Python 2.7.1 r271:86832):
import datetime
print datetime.datetime.now().microseconds
The interpreter returns
AttributeError: 'datetime.datetime' object has no attribute 'microseconds'
The correct way to access the number of microseconds is by:
datetime.datetime.now().microsecond # Note the final 's'
which is not consistent with the documentation.
Many thanks
Miquel |
|
Date |
User |
Action |
Args |
2014-05-29 21:03:13 | Miquel.Garcia | set | recipients:
+ Miquel.Garcia, docs@python |
2014-05-29 21:03:13 | Miquel.Garcia | set | messageid: <1401397393.28.0.277127762562.issue21609@psf.upfronthosting.co.za> |
2014-05-29 21:03:13 | Miquel.Garcia | link | issue21609 messages |
2014-05-29 21:03:12 | Miquel.Garcia | create | |
|