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 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.
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.
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.
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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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...
|
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...
|
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...
|
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)) || '-' ||...
|
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...
|
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...
|
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...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
|
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...
|
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,...
|
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...
| |