[Tutor] Formatting date/time

Eduardo Vieira eduardo.susan at gmail.com
Wed Aug 4 20:30:25 CEST 2010


I'm trying this example from python docs:
from time import gmtime, strftime
strftime("%a, %d %b %Y %H:%M:%S +0000", gmtime())

Output = 'Wed, 04 Aug 2010 17:58:42 +0000'
Is not there a string formatting option for the day without a leading
zero? Like: 'Wed, 4 Aug 2010 17:58:42 +0000'

It looks like it's not in the docs.

Thanks

Eduardo


More information about the Tutor mailing list