Dick Moores wrote: >> You could either create n with hours=minutes=0, or round the >> difference up to the next whole number of days. > > I have no idea how to implement either of > your suggestions as to how to eliminate it. Could you please spell > them both out?
1. In [17]: n=datetime.today() In [18]: n=datetime(n.year, n.month, n.day) In [19]: n Out[19]: datetime.datetime(2008, 4, 17, 0, 0) 2. In [20]: diff=y-n In [21]: diff Out[21]: datetime.timedelta(0, 57464, 721369) In [22]: days = diff.days In [23]: if diff.seconds or diff.microseconds: ....: days += 1 ....: ....: In [24]: days Out[24]: 1 Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor