AllExperts > Using MS Access 
Search      
Using MS Access
Volunteer
Answers to thousands of questions
 Home · More Using MS Access Questions · Answer Library  · Encyclopedia ·
More Using MS Access Answers
Question Library

Ask a question about Using MS Access
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Rob Henderson
Expertise
I can answer most MS Access design questions. I also welcome questions on database design and implementation and VBA programming questions. I also have expierence in application design for all the Office components (Excel, Outlook, etc).

 
   

You are here:  Experts > Computing/Technology > Business Software > Using MS Access > Variance OF DAYS

Using MS Access - Variance OF DAYS


Expert: Rob Henderson - 2/15/2005

Question
I would like to determine the variance of time between entries in a database . The date field is populated every time an entry is made. I would like to use this date field to determine that variance.  I familiar with Access....Thanks

Answer
Hi

You could use the DateDiff() built in function.

For example,

MsgBox DateDiff("d", Now(), Now() + 7)

This statement would display a message box with the difference in days between Now() and Now()+7

If you substitute the Now constants with your values you'll get what you need.

Note: If you use VBA to declare dates remember that the format is always in American format (mm/dd/yy) regardless of your local settings.

Look up help on the DateDiff() functionality

HTH

rob

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.