The month format specifier does not work.
from datetime import datetime
endDate = datetime.strptime('10 3 2011', '%j %m %Y')
print endDate
2011-01-10 00:00:00
endDate = datetime.strptime('21 5 1987', '%j %m %Y')
print endDate
1987-01-21 00:00:00
Now, according to the manual, the guide :
% m = month as a decimal number [01,12].
So, what am I missing, except for the hair I pulled out, trying to understand why my django __filter requests do not return anything (the dates that occur are invalid!)? I tried 03and to 05no avail.
Versions of things, platform, architecture, etc.:
$ python --version
Python 2.7
$ python3 --version
Python 3.1.2
$ uname -r
2.6.35.11-83.fc14.x86_64 (that Linux/Fedora 14/64-bit).
user257111
source
share