subtract dates with time module
Diez B. Roggisch
deets at nospam.web.de
Thu Mar 27 05:34:59 EDT 2008
barronmo wrote:
> I'm trying to get the difference in dates using the time module rather
> than datetime because I need to use strptime() to convert a date and
> then find out how many weeks and days until that date. I'm a beginner
> so any help would be appreciated. Here is the code:
Use strptime to create time-tuples, and use the fields in there to create
datetime-objects. Then do the math with them.
Diez
More information about the Python-list
mailing list