Education is the most powerful weapon
which you can use to change the world.
-Nelson Mandela
 
Home   News   Courses   Tips   Templates   Forums   Help   Order   Contact   Logon  
 
NEW: Excel Expert 11 - Learn XLOOKUP    dismiss
 
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:

 

 

Post Your Comments
 
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
 
Accessindex
Excelindex
Wordindex
Windowsindex
PowerPointindex
Photoshopindex
Visual Basicindex
ASPindex
Seminars
More...
Customers
 
Account Login
Online Theater
Downloads
Lost Password
Free Upgrades
Insider Circle
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Articles
Search The Site
Waiting List
Production Schedule
Collapse Menus
Help
 
Live Chat
Customer Support
WalkThru Tutorials
Troubleshooting
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Order
 
Video Tutorials
Handbooks
MYOLP Memberships
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Gift CDs
Contact
 
Live Chat
General Info
Support Policy
Contact Form
Email Richard
Mailing Address
Phone Number
Fax Number
Course Survey
Facebook    Twitter

YouTube Channel    LinkedIn

Blog RSS Feed   
Keywords: datediff function glossary  PermaLink