How to subtract two dates and get an actual number

E

erick-flores

Hello all

I know how to do this in excel but I dont know how to do it in an
Access form. I have two dates inv_date and QueryDate. Both dates are
field in my form. What I want is subtract QueryDate - inv_date and get
the results in days. This is what I tried w/o any luck
=([QueryDate]-[inv_date])

Can somebody help me here please....thanks in advance
 
J

John Vinson

Hello all

I know how to do this in excel but I dont know how to do it in an
Access form. I have two dates inv_date and QueryDate. Both dates are
field in my form. What I want is subtract QueryDate - inv_date and get
the results in days. This is what I tried w/o any luck
=([QueryDate]-[inv_date])

Can somebody help me here please....thanks in advance

Use the DateDiff function:

DateDiff("d", [QueryDate], [inv_date])

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top