Microsoft Office Online
Sign in to My Office Online (What's this?) | Sign in

 
 
Microsoft Office Access
Search
Search
 
Check for updates: (c) Microsoft
Office downloads
 
 
 
Warning: You are viewing this page with an unsupported Web browser. This Web site works best with Microsoft Internet Explorer 6.0 or later, Firefox 1.5, or Netscape Navigator 8.0 or later. Learn more about supported browsers.

Email this linkEmail this link Printer-Friendly VersionPrinter-Friendly Version Bookmark and ShareShare
Calculate the serial number of the day, week, or month in a date
 

The following table lists examples of expressions that use the Format function to calculate when a day, week, or month falls in a given time period.

You can use these expressions in calculated controls (calculated control: A control that is used on a form, report, or data access page to display the result of an expression. The result is recalculated each time there is a change in any of the values on which the expression is based.) on forms, reports, and data access pages (data access page: A Web page, published from Access, that has a connection to a database. In a data access page, you can view, add to, edit, and manipulate the data stored in the database. A page can also include data from other sources, such as Excel.).

Expression Description
=Format(Now(), "ww") Displays the number of the week of the year the current date represents, where ww is 1 through 53.
=Format(Now(), "y") Displays the number of the day of the year the current date represents, where y is 1 through 366.
=Format(Now(), "mmm") Displays the abbreviated month the current date represents, where mmm is Jan through Dec.

You can use these expressions in a calculated field in a query.

Expression Description
MyTurn: Format(Now(), "y") Displays in the MyTurn field the number of the day of the year the current date represents, where y is 1 through 366.
ThisMonth: Format(Now(), "mmm") Displays in the ThisMonth field the abbreviated month the current date represents, where mmm is Jan through Dec.