Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with DateDiff Between Two Fields

Status
Not open for further replies.

CoolFactor

Technical User
Dec 14, 2006
110
US
Hello,

I have 2 fields one by the name of FirstDay and the other by the name of LastDay and I want to calculate the number of days between the 2 fields using the following expression:

NumberOfDays: DateDiff("d",[FirstDay],[LastDay])

I get the Undefined function "DateDiff" in expression error when I try to execute this query.
 
sounds like you're missing a reference...i don't know where you need to look but if you search the forum for missing reference you should get some instructions that will help!


Leslie

Have you met Hardy Heron?
 
Anyway, you don't need any function at all:
NumberOfDays: Int([LastDay]-[FirstDay])

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
OK, Int is a JetSQL function.
If FirstDay and LastDay doesn't hold time value then:
NumberOfDays: [LastDay]-[FirstDay]

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top