DateDiff Problem

  • Thread starter Thread starter barnabythebear
  • Start date Start date
B

barnabythebear

Hi,

I'm having problems using this datediff in a querie.


Days: DateDiff("d",> g> ![Date In],> > > g> > ![Date Out])
 
No. What are those "greater than" signs?

The shortened syntax is:

DateDiff(Interval As String, Date1, Date2)

For example:

?DateDiff("d", Date(), #12/31/2003#)
34

Check Access VB Help for more info.

--
HTH
Van T. Dinh
MVP (Access)



barnabythebear said:
Hi,

I'm having problems using this datediff in a querie.


Days: DateDiff("d",> g> ![Date In],> > > g> > ![Date Out])
 
Thank you for posting your message with the relevant topic
in the Subject box - it makes searching easier!!

I have a similar problem, but have tried your solution
with no luck. This expression used to work in my Access
97 and has just recently decided to quit! I'm a little
nervous that it may be related to a recent upgrade to XP?

To calculate difference between Jan 1 and today:
Expr2: DateDiff("d",#01/01/2003#,Now())

And to calculate difference between today and Dec 31:
Expr3: DateDiff("d",Now(),#31/12/2003#)

The error message I'm getting is:
"Compile error in query expression..."

Your help very much appreciated!
Juanita
-----Original Message-----
No. What are those "greater than" signs?

The shortened syntax is:

DateDiff(Interval As String, Date1, Date2)

For example:

?DateDiff("d", Date(), #12/31/2003#)
34

Check Access VB Help for more info.

--
HTH
Van T. Dinh
MVP (Access)



"barnabythebear"
Hi,

I'm having problems using this datediff in a querie.


Days: DateDiff("d",> g> ![Date In],> > > g> > ![Date Out])
Does this look right? The results are very odd!!!

Thanks

nige.


.
 
Back
Top