Using Actuate BIRT Viewers : Functions and operators : DIFF_HOUR( )
 
DIFF_HOUR( )
Calculates the number of hours between two date values.
Syntax
DIFF_HOUR(date1, date2)
Arguments
date1
The first date or date expression to use in the calculation. If the date does not have a time value, the function assumes the time is midnight, 12:00 AM.
date2
The second date or date expression to use in the calculation. If the date does not have a time value, the function assumes the time is midnight, 12:00 AM.
Returns
The number of hours between date1 and date2.
Example
The following example calculates the number of hours between each value in the startTime data field and each value in the finishTime data field:
DIFF_HOUR([startTime],[finishTime])
The following example calculates the number of hours from the current date to Christmas. NOW( ) is a function that returns the current date and time. If you supply a literal date as an argument, you must include the time value, as shown in the following example.
DIFF_HOUR(NOW(), "12/25/08 12:00 AM")