Computer Learning Zone CLZ Access Excel Word Windows

We learn more by looking for the answer to a question and not finding it than we do from learning the answer itself.

-Lloyd Alexander
 
Home   Courses   Seminars   Templates   Help   TechHelp   Forums   Contact   Join   Order   Logon  
 
 
DateDiff Function

Glossary > Access

Returns the number of intervals between two dates. This can be days, months, years, etc.

  • DateDiff(Interval, Date1, Date2, [FirstDayOfWeek], [FirstWeekOfYear])

Interval can be:

  • yyyy - Year
  • q - Quarter
  • m - Month
  • y - Day of Year
  • d - Day
  • w - Weekday
  • ww - Week of Year
  • h - Hour
  • n - Minute
  • s - Second

Date1 and Date2 are valid DateTime fields

FirstDayOfWeek is optional and can be:

  • 0 - vbUseSystemDayOfWeek - Use the NLS API setting.
  • 1 - vbSunday - Sunday [default]
  • 2 - vbMonday - Monday
  • 3 - vbTuesday - Tuesday
  • 4 - vbWednesday - Wednesday
  • 5 - vbThursday - Thursday
  • 6 - vbFriday - Friday
  • 7 - vbSaturday - Saturday

FirstWeekOfYear is optional and can be:

  • 0 - vbUseSystem - Use the NLS API setting.
  • 1 - vbFirstJan1 - Start with week in which January 1 occurs (default).
  • 2 - vbFirstFourDays - Start with the first week that has at least four days in the new year.
  • 3 - vbFirstFullWeek - Start with first full week of the year.

RESOURCES:

 

Start a NEW Conversation
 
Only students may post right now. Click here for more information on how you can set up an account. If you are a student, please LOG ON first.
 
Subscribe
 
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Account Login
Online Theater
Downloads
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Email Richard
Mailing Address
Phone Number
Fax Number
Course Survey
Blog RSS Feed    Twitter

YouTube Channel    LinkedIn
Keywords: datediff function glossary  PermaLink