By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,466 Members | 2,482 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,466 IT Pros & Developers. It's quick & easy.

week format

P: n/a
Hi all,
I am using office XP and have a question regarding the format function.
I am using wk:format([pickandscratch].[schedule],"WW") to show what week a
certain date is. The problem is that a week runs from Sun to Sat in Access
and our warehouse week runs from Sat to Fri. This is making my "week to
date" calculations a day out. Is there a way that I can specify which day a
new week starts on within this query????
Many thanks in advance,

Mark
Nov 12 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Sat, 1 May 2004 04:19:13 +0100, Mark Reed wrote:
Hi all,
I am using office XP and have a question regarding the format function.
I am using wk:format([pickandscratch].[schedule],"WW") to show what week a
certain date is. The problem is that a week runs from Sun to Sat in Access
and our warehouse week runs from Sat to Fri. This is making my "week to
date" calculations a day out. Is there a way that I can specify which day a
new week starts on within this query????

Many thanks in advance,

Mark


Look up the datepart() function in VBA help.

wk:DatePart("ww",[DateField],7)
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 12 '05 #2

P: n/a
Mark Reed wrote:
Hi all,
I am using office XP and have a question regarding the format function.
I am using wk:format([pickandscratch].[schedule],"WW") to show what week a
certain date is. The problem is that a week runs from Sun to Sat in Access
and our warehouse week runs from Sat to Fri. This is making my "week to
date" calculations a day out. Is there a way that I can specify which day a
new week starts on within this query????
Many thanks in advance,

Mark

If you put a , after "WW" the function will prompt you for the first day
of the week...Sunday is the default. Look at the Format function in
help. Use vbSunday...vbSaturday to specify the day.

You can even tell it various start dates for the first week on the year
if you add another comma.

Nov 12 '05 #3

P: n/a
Magic, works a treat!!!!

Thankyou very much
Mark
"fredg" <fg******@example.invalid> wrote in message
news:r3****************************@40tude.net...
On Sat, 1 May 2004 04:19:13 +0100, Mark Reed wrote:
Hi all,
I am using office XP and have a question regarding the format function. I am using wk:format([pickandscratch].[schedule],"WW") to show what week a certain date is. The problem is that a week runs from Sun to Sat in Access and our warehouse week runs from Sat to Fri. This is making my "week to
date" calculations a day out. Is there a way that I can specify which day a new week starts on within this query????

Many thanks in advance,

Mark


Look up the datepart() function in VBA help.

wk:DatePart("ww",[DateField],7)
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.

Nov 12 '05 #4

P: n/a
Most date functions that support "week" also support your specifying the
"first day of the week"... for example, in recent versions, check help on
the Weekday function.

Larry Linson
Microsoft Access MVP

"Mark Reed" <ma*********@ntlworld.com> wrote in message
news:wG***************@newsfe3-win.server.ntli.net...
Hi all,
I am using office XP and have a question regarding the format function. I am using wk:format([pickandscratch].[schedule],"WW") to show what week a
certain date is. The problem is that a week runs from Sun to Sat in Access
and our warehouse week runs from Sat to Fri. This is making my "week to
date" calculations a day out. Is there a way that I can specify which day a new week starts on within this query????
Many thanks in advance,

Mark

Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.