Changes

Jump to: navigation, search

Displaying Difference between Two dates in Hours in Reports

309 bytes added, 14:09, 19 November 2013
no edit summary
To calculate difference between two dates in hours in the Reports, we can use the following syntax:
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">24*(To_days(enddate)-To_days(startdate))+(hour(enddate)-hour(startdate))+((minute(enddate)-minute(startdate))/60) </pre>'''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:
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">24*(To_days([2])-To_days([1]))+(hour([2])-hour([1]))+((minute([2])-minute([1]))/60)</pre>
==See Also==
8,849
edits

Navigation menu