Hi, Can someone help me with this construction? I have two dates that I want to find the difference in minutes or hours (preferably minutes) zdate 2001/03/07 17:08:00 GMT+1 start_date 2001/03/07 16:41:14 GMT+1 What I try: <dtml-var expr="_.DateTime(zdate-start_date).PreciseTime()"> which returns: 01:00:00.023 What is wrong here? I've tred breaking both dates down to Times first and then subtracting, but it doesnt work either..... HELP!? Thanks, PazLosingHairAtThisPont
Some more info: I can now get the desired result with this: <dtml-call "REQUEST.set('date1', _.int(zdate))"> <dtml-call "REQUEST.set('date2', _.int(start_date))"> <dtml-var expr="_.DateTime(date1-date2).minute()"> Which returns the time difference in minutes. BUT: 1) Using the REQUEST.set causes noticable difference in performance. How can I combine them in the <dtml-var> statement? 2) I want the PreciseTime. But it always returns at least a 1 hour time, plus the minutes that are accurate. Even if the time difference is 0 seconds, I get: 01:00:00.000.... Why? Arrrgh! Paz
participants (1)
-
Paul Zwarts