Custom Search
 


Examples of MS Access DateAdd function



For detailed description of DateAdd function, refer to this page.

The date format in the examples below is determined by the Short date format that was set in Control Panel's Regional Options (dd-MMM-yyyy in this case).

DateAdd function syntax:

DateAdd (interval, number, date)

Expression Interval Description Comment Date to be evaluated Returns
DateAdd("m",5,[OrderDate]) m Month of year Add 5 months 04-Jul-1996 3:37:24 PM 04-Dec-1996 3:37:24 PM
DateAdd("d",5,[OrderDate]) d Date of month Add 5 dates 04-Jul-1996 3:37:24 PM 09-Jul-1996 3:37:24 PM
DateAdd("yyyy",5,[OrderDate]) yyyy Year Add 5 years 04-Jul-1996 3:37:24 PM 04-Jul-2001 3:37:24 PM
DateAdd("q",5,[OrderDate]) q Quarter of year Add 5 quarters 04-Jul-1996 3:37:24 PM 04-Oct-1997 3:37:24 PM
DateAdd("y",5,[OrderDate]) y Day of year Add 5 days 04-Jul-1996 3:37:24 PM 09-Jul-1996 3:37:24 PM
DateAdd("w",5,[OrderDate]) w Weekday Add 5 weekdays 04-Jul-1996 3:37:24 PM 09-Jul-1996 3:37:24 PM
DateAdd("ww",5,[OrderDate]) ww Week of year Add 5 weeks 04-Jul-1996 3:37:24 PM 08-Aug-1996 3:37:24 PM
DateAdd("h",5,[OrderDate]) h Hour Add 5 hours 04-Jul-1996 3:37:24 PM 04-Jul-1996 8:37:24 PM
DateAdd("n",5,[OrderDate]) n Minute Add 5 minutes 04-Jul-1996 3:37:24 PM 04-Jul-1996 3:42:24 PM
DateAdd("s",5,[OrderDate]) s Second Add 5 seconds 04-Jul-1996 3:37:24 PM 04-Jul-1996 3:37:29 PM



Copyright© GeeksEngine.com



Other Recent Articles from the MS Access category:

1.Examples of MS Access DateDiff function used in query and VBA code
2.MS Access DateDiff function
3.How to find out your computer name and username by VBA
4.Examples of MS Access DatePart function
5.MS Access DatePart function
6.MS Access DateAdd function
7.IIF function basics - the CASE statement of MS Access
8.MS Access Date Expression
9.Solved: MS Access error "The text is too long to be edited"
10.Create MS Access Combo Box essential properties by VBA code
11.Create MS Access Combo Box essential properties manually
12.How to do text search in MS Access programmatically
13.Solved - the size of the Access query result is larger than the maximum size of a database (2 GB)
14.How to easily get a list of field names in MS Access
15.How to count distinct records in MS Access
16.How to do transaction based processing in MS Access
17.How to open a document (local/network file or web page) from MS Access
18.How to use ADOX to create unique composite index - the VBA approach
19.How to do cross-table update queries in MS Access - the right way
20.Three efficient ways to get the number of records by using VBA
21.How to create a composite unique index (not as a primary key) in MS Access
22.Use VBA to get the correct number of records in a Recordset object
23.Disable Access Prompt when a record is changed, table deleted, or action queries run
24.How to hide and unhide a MS Access object
25.How to return multiple values from a VBA function (Part 3)
26.How to return multiple values from a VBA function (Part 2)
27.How to return multiple values from a VBA function (Part 1)
28.Three ways to programmatically duplicate a table in MS Access by VBA
29.Create a DLL by CSharp or VB.Net for VBA
30.How to correctly reference and call a DLL
31.How to register a C# or VB.Net DLL
32.Email address validation by Regular Expressions using VBA
33.Fix MS Access error: Query must have at least one destination field
34.How to unselect radio buttons in MS Access after it has been selected
35.How to Change Query Timeout Value for MS Access SQL Queries
36.What is Northwind Traders database

Copyright © 2024 GeeksEngine.com. All Rights Reserved.

This website is hosted by HostGator.

No portion may be reproduced without my written permission. Software and hardware names mentioned on this site are registered trademarks of their respective companies. Should any right be infringed, it is totally unintentional. Drop me an email and I will promptly and gladly rectify it.

 
Home | Feedback | Terms of Use | Privacy Policy