K
Kalle Anke
I want to parse a date string, for example '2005-09-23', and since I haven't
done this before I would like to ask what is the best way to do it.
I've looked around and the dateutil seems to be what most people use, but
unfortunately I only get an empty file when I try to download it. I also
tried the standard modules and ended up with this
import datetime
from time import strptime
d = '2005-09-23'
w = strptime(d,'%Y-%m-%d')
print datetime.date( w[0], w[1], w[2] )
But I suspect there is a better way to do it??
done this before I would like to ask what is the best way to do it.
I've looked around and the dateutil seems to be what most people use, but
unfortunately I only get an empty file when I try to download it. I also
tried the standard modules and ended up with this
import datetime
from time import strptime
d = '2005-09-23'
w = strptime(d,'%Y-%m-%d')
print datetime.date( w[0], w[1], w[2] )
But I suspect there is a better way to do it??