DISCOVER
×

How to Calculate DateDiff in Access

Updated April 17, 2017

If you are not a math wizard or just lack the energy, you can calculate the difference between two different dates or times in Microsoft Access using a function called "DateDiff." By using this feature, you can save a lot of your time as well as effort spent on searching. Just enter in the different dates or click on the cells, and let Access do the work for you. You will have the date difference in no time.

Understand the DateDiff function. The DateDiff function uses the expression "=DateDiff (interval, date 1, date 2)" to calculate differences in time.

Choose the DateDiff function. All functions start with an "=" sign to alert Access that it is not normal text. Therefore, start the function with "=DateDiff" to alert Access that you are using the DateDiff function.

Choose the "Interval," which is days, weeks or seconds. Choose the "date 1," which is the date you wish you start. Choose the "date2." "Date2" is the date you wish you end.

Click on a cell with the left mouse button to select it. The cell will be highlighted, indicating that it is the cell in which the DateDiff function will be calculated.

Type the complete DateDiff function into the cell. For example, if you wanted to find out how many days there were from March 11, 2011 to your birthday on March 31, 2011; enter "=DateDiff ("d", #11/03/2011#, #31/03/2011#)" in the cell.

Click on the "Enter" key to calculate the DateDiff function. For the example in Step 2, the cell will show "20" because the difference between March 11, 2011 and March 31, 2011 is 20 days.

Cite this Article A tool to create a citation to reference this article Cite this Article

About the Author