get weekday as week number in a month

Nikhil Verma varma.nikhil22 at gmail.com
Thu Nov 8 08:09:37 CET 2012


Hi

I was converting simple string in django into a standard datetime object
and creating two separate list one of date and other of time.

I want to ask this :-

 date_object = datetime.strptime('November 9 2012 11:30PM', '%B %d %Y
%I:%M%p')

which  gives me :-

datetime.datetime(2012, 11, 9, 23, 30) and this is correct.

What i want to know is if i convert it to

date_object = datetime.strptime(' Friday November 9 2012 11:30PM', '%u %B
%d %Y %I:%M%p' )

It is giving me ValueError saying u is unsupported directive !

How can i get weekday as week number ?

Thanks in advance !



-- 
Regards
Nikhil Verma
+91-958-273-3156
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20121108/085b7964/attachment.html>


More information about the Python-list mailing list