471,108 Members | 1,663 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,108 software developers and data experts.

week format

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
4 2403
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
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
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
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.

Similar topics

7 posts views Thread by Shuffs | last post: by
4 posts views Thread by Mark Reed | last post: by
9 posts views Thread by Ray | last post: by
3 posts views Thread by Mal | last post: by
11 posts views Thread by shsandeep | last post: by
6 posts views Thread by aarklon | last post: by
10 posts views Thread by Jim | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.