Week of the year

R

ReidarT

In a control, I want to make the format to week number (week of the year),
like =format([dato];"ww"),
but it doesn't work.
regards
reidarT
 
C

Chris L via AccessMonster.com

Change the ; to a ,
In a control, I want to make the format to week number (week of the year),
like =format([dato];"ww"),
but it doesn't work.
regards
reidarT
 
R

ReidarT

The problem is to find the date of week one of the year. This year week 1
started the 03. january.

regards
reidarT
 
D

Douglas J Steele

Look at the details of the Format function in the Help file.

There are two additional optional parameters that you use in conjunction
with the "ww" format:

FirstDayOfWeek: A constant that specifies the first day of the week.
FirstWeekOfYear: A constant that specifies the first week of the year.

Values you can use for firstdayofweek are:

vbUseSystem (or 0): Use NLS API setting.
vbSunday (or 1): Sunday (default)
vbMonday (or 2): Monday
vbTuesday (or 3): Tuesday
vbWednesday (or 4): Wednesday
vbThursday (or 5): Thursday
vbFriday (or 6): Friday
vbSaturday (or 7): Saturday

Values you can use for FirstWeekOfYear are:

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


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


ReidarT said:
The problem is to find the date of week one of the year. This year week 1
started the 03. january.

regards
reidarT
ReidarT said:
In a control, I want to make the format to week number (week of the year),
like =format([dato];"ww"),
but it doesn't work.
regards
reidarT
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Function for week number 5
Reset sequential number 3
Combine "ww" and "yyyy" 3
Form filter problem 3
week of the year 1
Week Number 2
Finding the first DAY of the week of a given week. 3
Form Date in WW format 2

Top