Microsoft Access DateAdd Function
Category: Microsoft Access Date Functions
Applies to: Microsoft® Access® 2013, 2016, 2019 and 365 (Windows Desktop)
The Microsoft Access DateAdd function adds a time or date interval to a date and then returns the date.
Syntax
DateAdd (interval, number, date)
Parameters
Interval
The Interval parameter is a required time or date interval to be added to a specific date (such as year or month using codes).
Use the following codes (in quotes):
yyyy = year
q = quarter
m = month
y = day of the year
d = day
w = Weekday
ww = Week
h = hour
n = Minute
s = Second
Number
The number parameter is a required number and is the interval to add to date. The number can be positive for dates in the future or negative for dates in the past.
Date
The date parameter is a required date (typically a date field) to which the interval is added.
Examples
The following 3 examples refer to either a date field and function or functions (you may enter function names and field names in lower case):
Calculate a date 6 months from a date:
DateAdd("m",6,[dateentered])
Calculate a date 1 year from a date:
DateAdd("yyyy",1,[dateentered])
Calculate a date 15 days before the current date (the Date function is used here for the current date):
DateAdd("d",-15,Date())
Additional Resources
What is Microsoft Access and What Is It Used For
Related
How to Create a Calculated Field in a Microsoft Access Query
Our instructor-led courses are delivered in virtual classroom format or at our downtown Toronto location at 18 King Street East, Suite 1400, Toronto, Ontario, Canada (some in-person classroom courses may also be delivered at an alternate downtown Toronto location). Contact us at info@avantixlearning.ca if you'd like to arrange custom instructor-led virtual classroom or onsite training on a date that's convenient for you.
Custom training
Register now for a public course or contact us at info@avantixlearning.ca for more information about any of our courses or to discuss custom training options (virtual classroom or live classroom).
Related courses
Microsoft Access: Introduction
Microsoft Access: Intermediate / Advanced
Microsoft Access: Formulas and Functions
Microsoft Excel: Intermediate / Advanced
You may like
How to Highlight Records or Values in a Microsoft Access Report Using Conditional Formatting
You can highlight values in fields or records in Microsoft Access reports using conditional formatting. Certain conditions must be met in order for the formatting to be applied …
You may also like
7 Microsoft Project Navigation and Selection Shortcuts in Task Lists
If you are working in Gantt Chart view, you can use these keyboard shortcuts to quickly move and select in your task list.
Visio Shortcuts for Zooming and Panning using Your Mouse and Keyboard
Check out these great ways to zoom and pan in your Microsoft Visio diagrams quickly using your mouse and keyboard.
10 Great Keyboard Shortcuts for Selecting Visio Tools
Check out these 10 great Microsoft Visio shortcuts for selecting common tools in the Ribbon including the Pointer, Text tools and drawing tools.
Avantix Learning | 1 Yonge Street, Suite 1801 (Toronto Star Building), Toronto, Ontario, Canada M5E 1W7 | info@avantixlearning.ca