Microsoft Office Tutorials and References
In Depth Information
Performing Date and Time Calculations
Table 2-4
Examples of Access Date/Time Functions
Function and Syntax
The current date
Returns the current date according to your computer’s
The current time
Returns the current time according to your computer’s
The current date and time
Returns the current date and time according to your
computer’s clock.
The date from an expression ,
which can be any string that
looks like a date
CDate(“Mar 31, 2013”) returns 3/31/2013 .
DateAdd( interval, number,
date )
The date that is number of days,
weeks, months ( interval )
from date
DateAdd(“m”,14,#1/1/2013#) returns
3/1/2014 , the date that’s 14 months after January
1, 2013.
The number of hours, days,
weeks, ( interval ) between
two dates
returns 52 because there are 52 weeks between the
two dates.
DateDiff( interval, date1,
date2 firstdayofweek fir [,
stweekofyear ]])
The day of the month expressed
as a number between 1 and 31
Day( date )
Day(#1/15/2013#) returns 15 because 1/15/2013
falls on the 15th day of the month.
The hour of a time
Hour( time )
Hour(Now()) returns a number representing the
current hour of the day.
monthNumber abbreviate ])
The month of a date, spelled out
(if abbreviate is False ) or
abbreviated (if abbreviate is
True )
MonthName(12,False) returns December ;
MonthName(12,True) returns Dec because
December is the 12th month of the year.
Search JabSto ::

Custom Search