26 Apr
2000
26 Apr
'00
5:18 p.m.
jens ebaer wrote:
Hi all,
I have to to this: date - date = 20 days. (2000-5-5 - 2000-5-2 = 3 days)
I checked Zope Quick Reference but couldn“t find a function which provide this.
May someone has a python function and can give me this funktion.
Where date2 and date1 are DateTime objects, and date2 is later than date1: <dtml-var "date2-date1"> gives you the number of days difference as a floating point number. <dtml-var "_.int(_.round(date2-date1))"> gives you the number of days as a rounded integer. (That is, half days get counted as a whole day). Make a string into a DateTime object using _.DateTime('some date string'). -- Steve Alexander Software Engineer Cat-Box limited