ACC2: DatePart(), DateDiff() Functions Ignore Global SettingsID: Q121012
|
Novice: Requires knowledge of the user interface on single-user computers.
In Microsoft Access, you can use the First Week and First Weekday options
settings to specify values other than the default values of January 1 for
the first week, and Sunday for the first week day.
If you do use these option settings to change the default values, you must
specify the optional setting when you use either the DatePart() or the
DateDiff() function.
To change these option settings, click Options on the View menu, select
General in the Category box, and then in the Items box select the option
you want to change.
In Microsoft Access, two new parameters have been added to the DatePart()
and DateDiff() functions. The new parameters are FirstWeek and
FirstWeekDay. If you change the default setting for the First Week or the
First Weekday option, you must explicitly define the matching parameter
when you use the DatePart() or DateDiff() function.
For example, if you set the First Week option setting to First Full Week,
and the First Weekday option setting to Monday, use the following syntax
for the DateDiff() and DatePart() functions:
For more information about the DateDiff function, search the Help Index for
"DateDiff function."
For more information about DatePart function, search the Help Index for
"DatePart function."
Keywords : kbusage
Version : 2.0
Platform : WINDOWS
Issue type : kbinfo
Last Reviewed: April 6, 1999