Difference between revisions of "Displaying Difference between Two dates in Hours in Reports"
From SmartWiki
Julia Decker (talk | contribs) |
|||
Line 5: | Line 5: | ||
24*(To_days([2])-To_days([1]))+(hour([2])-hour([1]))+((minute([2])-minute([1]))/60) | 24*(To_days([2])-To_days([1]))+(hour([2])-hour([1]))+((minute([2])-minute([1]))/60) | ||
− | [[Category:Reports]][[Category:Enhancements]] | + | ==See Also== |
+ | * [[Calculate Difference Between Two Dates in Hours - Custom Fields]] | ||
+ | |||
+ | [[Category:Reports]][[Category:Enhancements]][[Category:Date Formats]] |
Revision as of 09:57, 19 November 2013
To calculate difference between two dates in hours in the Reports, we can use the following syntax:
24*(To_days(enddate)-To_days(startdate))+(hour(enddate)-hour(startdate))+((minute(enddate)-minute(startdate))/60) where the enddate and startdate may be replaced by column numbers. For example, if the Startdate is displayed in column 1 and Enddate is displayed in column 2 then the syntax would be:
24*(To_days([2])-To_days([1]))+(hour([2])-hour([1]))+((minute([2])-minute([1]))/60)