[Tutor] Using datetime module
acidblue
acidrex at earthlink.net
Tue May 25 14:25:42 EDT 2004
I'm trying to add dates together using datetime module.
I want usr's to enter a date and add a number of days to it.
Example:
import datetime
usrDate= input("Enter the date:")
T= input("Enter how many days:")
print datetime.date.today() + datetime.timedelta(days=T)
Obviosly the 'datetime.date.today()' only works for today's date What I
what is this:
Psuedo code: usrDate + datetime.timedelta(days=T)
Am I using the right module? Syntax? Arguments?
More information about the Tutor
mailing list