cancel
Showing results for 
Search instead for 
Did you mean: 

How Do I Calculate the Difference Between Two Dates?

BuckeyeScott
Explorer
0 Kudos

I'm creating a new custom query that will be used for a new custom report.  I would like to calculate the difference between two dates and display the difference as a result field on my query.

The two dates are RFx Base Date (FCI_RFX_DOC-BASE_DATE_DATE) and RFx Response Date (FCI_RFX_RESPONSE-FIRM_DATE_DATETIME).

Note: The WHERE clause in the SELECT statement ensures that I'm only evaluating firm responses.  So, the RFx Response Date will always be populated.

Does anyone know how I would calculate the difference in days between these two dates and display the result as a result field in my query?

Thanks, Scott

Accepted Solutions (1)

Accepted Solutions (1)

BuckeyeScott
Explorer
0 Kudos

I found the solution myself.   

This appears to work correctly.

(<%SCHEMA%>.FCI_DATEDIFF(FCI_DATETRUNC(T1.BASE_DATE_DATE),
FCI_DATETRUNC(T3.FIRM_DATE_DATETIME), 16))

Answers (0)