473,385 Members | 1,727 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,385 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 2541
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.