Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing from Sunday is start of week to end of week

Status
Not open for further replies.

Gavroche00

Technical User
Feb 4, 2004
49
US
I have in my report a date control whith the format ww for Week number. Because my computer must be based on Sunday is first day of the week, the week number is off by 1 week (the first Sunday of the year, 01/04/04 displays as week #2). Can anyone tell me where to go to change that?

The Faq's show date functions but not formats. I looked in Windows help and no luck - went to the control panel and no luck, and went to Access help and no luck. Thank you for your help.

David
 
Hi

Look up format() in help, I think you will find it has a parameter to determine what is the first day of the week

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
I am very sorry guys. I didn't find info in the format() index help, and the Microsoft articles refers to Access 2.0. There is no Options under the view menu in 2000 or XP. Anyone else can help please?
 
Hi

like I said it is in help

Returns a Variant (String) containing an expression formatted according to instructions contained in a format expression.

Syntax

Format(expression[, format[, firstdayofweek[, firstweekofyear]]])

The Format function syntax has these parts:

Part Description
expression Required. Any valid expression.
format Optional. A valid named or user-defined format expression.
firstdayofweek Optional. A constant that specifies the first day of the week.
firstweekofyear Optional. A constant that specifies the first week of the year.
Settings

The firstdayofweek argument has these settings:

Constant Value Description
vbUseSystem 0 Use NLS API setting.
VbSunday 1 Sunday (default)
vbMonday 2 Monday
vbTuesday 3 Tuesday
vbWednesday 4 Wednesday
vbThursday 5 Thursday
vbFriday 6 Friday
vbSaturday 7 Saturday
The firstweekofyear argument has these settings:

Constant Value Description
vbUseSystem 0 Use NLS API setting.
vbFirstJan1 1 Start with week in which January 1 occurs (default).
vbFirstFourDays 2 Start with the first week that has at least four days in the year.
vbFirstFullWeek 3 Start with the first full week of the year.
Remarks

To Format Do This
Numbers Use predefined named numeric formats or create user-defined numeric formats.
Dates and times Use predefined named date/time formats or create user-defined date/time formats.
Date and time serial numbers Use date and time formats or numeric formats.
Strings Create your own user-defined string formats.
If you try to format a number without specifying format, Format provides functionality similar to the Str function, although it is internationally aware. However, positive numbers formatted as strings using Format don’t include a leading space reserved for the sign of the value; those converted using Str retain the leading space.

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Thank you very much for the reply,. I totally didn't get it at first. Now I do. Thank you.

David
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top