473,396 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 2544
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Shuffs | last post by:
Could someone, anyone please tell me what I need to amend, to get this function to take Sunday as the first day of the week? I amended the Weekday parts to vbSunday (in my code, not the code...
4
by: Mark Reed | last post by:
Hi all, I am using office XP and have a question regarding the format function. I am using wk:format(.,"WW") to show what week a certain date is. The problem is that a week runs from Sun to Sat in...
9
by: Ray | last post by:
I need to convert the normal calendar to show the week no., the period no. and the financial year. The financial year format is as follows:- Date start: 2 May, 2005 7 days a week, 4 weeks a...
3
by: Mal | last post by:
Hello, Any advice on a function to convert a given week number to a date? Ideally I'd like the first day of that week. I'm using this to compare year to year....using the week number as the...
2
by: jnikle | last post by:
I'm stumped on this one. I have a report that shows production calculations for a user-selected period divided up into weeks. Currently, I just use format(,"ww") to get the calendar week for...
11
by: shsandeep | last post by:
I used the following query to retrieve the date in dd-mon-yyyy format. db2 => SELECT RTRIM(CHAR(DAY(COVG_TYP_STRT_DT))) || '-' || RTRIM(MONTHNAME(COVG_TYP_STRT_DT)) || '-' ||...
6
by: aarklon | last post by:
Hi folks, I found an algorithm for calculating the day of the week here:- http://www.faqs.org/faqs/calendars/faq/part1/index.html in the section titled 2.5 what day of the week was 2 august...
10
by: Jim | last post by:
I'm sure this has been asked before but I can't find any postings. I have a table that has weekly inspections for multiple buildings. What I need to do is break these down by the week of the...
1
by: Wayne | last post by:
I'm using the following expression in the query grid to show the Month and Year of the date field "TxtDate": Week: Format(,"ww yy",4) I am grouping the results on this field. Is there a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.