View Full Version : Access passthrough SQL Oracle - Replicating DateDiff function


twoplustwo
08-13-2009, 12:25 AM
Hi guys,

I've a passthrough query to an Oracle backend database.

I am trying to find the difference (numerically) between a FORECAST_DATE and a SETTLEMENT_DATE.

Didn't have any joy with:

DateDiff("d",SETTLEMENT_DATE,FORECAST_DATE) AS Diff

I assume because DateDiff is native to Access. Any ideas?

twoplustwo
08-13-2009, 12:29 AM
Sorted!

Went for:

ROUND(SETTLEMENT_DATE - FORECAST_DATE,0) AS Diff

To return the whole difference between the two dates. Bargain.