When The Last Week Of The Year And The First Week Of The Next, Are The Same!

Mar 18, 2006

I have the following expression which works nicely to group all of my dates into their respective weeks of the year, by week dates beginning Mondays:

WeekStart: ([MyDateField]+1)-DatePart("w",[MyDateField],2)

However, since the week beginning 12/26/05 crosses over both '05 and '06 (as week 53 and week 1), I get two groups of dates recorded for the week of 12/26/05 when I run my query.

Since my chart is based on weekly totals, I can't have two separate totals with the same 'week beginning' date.

How can I adjust my code to get one total group of dates for the week of 12/26/05?

Help greatly-needed!....

View Replies


ADVERTISEMENT

Reports :: Inserting Page Break To Show Week By Week Pages

Feb 11, 2015

I've created a report based on a query that shows me the jobs that have been added to tblJobs between two selected dates.

The report works fine and displays all the information I need, however other than being sorted by day of the week i.e. Monday, Tuesday, Wednesday etc. The records just run on one after another.

I want to create a page break, so that a full week is shown on a single page before then forcing a new page when it moves in to the next week.

View 8 Replies View Related

Leading Zero In Week Of Year

Jan 8, 2007

I am using the format below to give me Year-WkNo and the leading zeros are not being put in so when a report is ran the yyyy-ww is not sorted correctly. Is there a way to get Jan 2007 week 1 to come out 2007-01?


YearMonth: Format([F Jobs Stats_sub2].[MaxofWork_Date],"yyyy-ww")

Thanks,
Greg

View 2 Replies View Related

Sort Date Formatted As Year And Week

Dec 7, 2004

I have a table with sales by day. I want to display the data in a graph summarised by week but the period spans several years. If I format the date thus Format(MyField,"yyyy ww") then Access sorts the results thus 2003 1, 2003 10, 2003 11 but it should be 2003 1, 2003 2, 2003 4 etc.

How can I get Access to sort in ascending order correctly on the formatted date?

Thanks

View 2 Replies View Related

Queries :: Week Number Query When Year Changes

Feb 28, 2014

I analyse things by the date they are ordered by the office.

The date gets put into a spreadsheet and i import this into access for the querying.

I need to summarise it by weeknumber and year.

I use the following queries:

To get the week: Week Number: DatePart("ww",[DateOrdered],0,2)
To get the year: Year: Year([DateOrdered])
To put it together: Weekyear: [Year] & "_" & [Week Number]

The problem is when the year changes.

The dates for week 1 for 2014 are between 30/12/2013 and 05/01/2014 and therefore straddles 2013 and 2014.

Therefore when the year and week number is put together the following results are given for that particular week:

DateOrdered - Result of above query
30/12/2013 - 2013_1
31/12/2013 - 2013_1
01/01/2014 - 2014_1
02/01/2014 - 2014_1
03/01/2014 - 2014_1
04/01/2014 - 2014_1
05/01/2014 - 2014_1

All of the above should all read 2014_1 but some obviously are 2013_1. This causes me problems when doing further analysis and cross tabulations.

How can I amend my query so that the above all show the correct year and week number: 2014_1 ?

View 9 Replies View Related

Modules & VBA :: WeekVal -> First Day Of Week For Current Year

Feb 10, 2015

Given a specific week no. for the current year... I need to return the first date of that week....

For example : week4 of this year (returns) 19/1/2015

View 2 Replies View Related

Date Query (last Week, Last 2 Weeks, Last Month, Last Year, All)

May 31, 2007

Hi

Would be great if I could get some help on this:

I have big table that gets updated almost every day with new data. There is a date column. I have a Form where I can enter queries. I need to add a panel where I can spcify if the query should involve the data should involve the date from last week only, from the last 2 weeks, from the last month or if the query should involve the overall data.:confused:

It somhow need to be check what the date is today and then caclulate back.

Any help on this would be much appreciated.:D

Thanks
Daniel

View 6 Replies View Related

Calcute Week Numbers Starting From 1 July Of Current Year

Feb 13, 2007

Hi everyone,

I want to calculate the week number of a date in a year starting from the 1 July (of the current year) - as this is the beginning of the Financial Year in Australia.

The starting day of the week is Wednesday.

I've been trying to think how I could use the Access DatePart Function in a query to calculate the week number from sales records.

I have had no trouble calculating the week number from the 1 Jan using the DatePart function. However, the function doesn't allow me to select a different date other than the first week of January.

So as a work around, I've thought of calculating the week number of 1 July in the current year, and just using the DateAdd function to add the week number to the week calculated by the DatePart Function.

Not quite working yet. Here's what I've come up with so far.


WeekNumberCount: DatePart("ww",[DateCalled],4)

I use the following to calculate the "my" starting week of the year:

StartingWeekInYear: DatePart("ww",DateAdd("ww",0,"1-July-" & Year(Date())),4)


Then I add the two together together:

MyWeekNumberCount: DatePart("ww",[DateCalled],4)+DatePart("ww",DateAdd("ww",0,"1-July-" & Year(Date())),4)


I know it needs some work to be useful for all years. Any suggestions?

View 3 Replies View Related

Week Commencing Day From Week Number

Nov 6, 2006

I have a query that groups records by date into week numbers using the following expression.

WeekNumber: DatePart("ww",[Date],2)

I would prefer to display the result as the week commencing Monday date.

How?

View 13 Replies View Related

Year To Date Totals, Month To Date, Week To Date

Oct 9, 2005

Can someone tell me how to get year to date totals, month to date totals, week to dates in a query? I need to get all three for three different fields.

I was not able to get the totals with the formulas given. I received the totals for each day instead. Are there any other suggestions? I am trying to different formulas, but they are not working either. I did try doing different queries with the formulas to see if that would work.

View 9 Replies View Related

Counting By Week

May 29, 2005

What I would like to do is get a count of the product sold and view it over a ten week period in this case week one starts 26th June.

Wk1, Wk2, Wk3 ....

x 10 5 15 etc
y 20 4 12




in the format above but I am not sure how to achieve this, I have the following:


SELECT COURSEBK.[COURSE-DSName], COURSEBK.From, COURSEBK.Description, Count(COURSEBK.[COURSE-DSName]) AS [CountOfCOURSE-DSName]
FROM COURSEBK
GROUP BY COURSEBK.[COURSE-DSName], COURSEBK.From, COURSEBK.Description
HAVING (((COURSEBK.From)>=#6/26/2005# And (COURSEBK.From)<=DateAdd("ww",+10,"26/06/05")))
ORDER BY COURSEBK.From;

(the above is working despite access changing the date format between the hashes)


regards in advance foir guidance

View 5 Replies View Related

Q.? Week Numbers

Jan 23, 2006

How do you convert an inputted date to a week number in a query please.

Thanks in advance. :)

View 9 Replies View Related

Day Of Week Totals

Jun 26, 2006

I have a table that has a start day and end day. I would like to get a total for all events occuring on the days of the week (mon, tues, etc.). The problem I am having is when the start day and end day are not the same I need to count that event for all the days in between also.

Example

(Start Day)/(End Day)
(Sat 1/1/2005)/(Sat 1/1/2005)
(Sat 1/1/2005)/(Sun 1/2/2005)
(Sat 1/1/2005)/(Sat 1/8/2005)
(Sun 1/2/2005)/(Mon 1/3/2005)
(Mon 1/3/2005)/(Mon 1/17/2005)
(Thurs 1/6/2005)/(Mon 1/10/2005)
(Thurs 1/6/2005)/(Thurs 1/6/2005)

Results:
Day/num events
Sun/5
Mon/3
Tue/2
Wed/2
Thu/4
Fri/3
Sat/5

Any help you can provide would be greatly appreciated.

View 4 Replies View Related

First Day Of Week Expression

Jul 20, 2006

Does anyone know a query expression that would always return the date of the first day of the week (a Monday) for the week after next?:confused:

View 2 Replies View Related

Display All With DOB Within A Week

Oct 2, 2006

Hi, I am doing a project at school and need to run a query that displays everyone that has a date of birth within 7 days using a date in the format 01/01/2001. I really have no idea how to do this and would really appreciate any help.
Thank you very much
Kris

View 2 Replies View Related

Need Help In Work Week

May 2, 2007

i would like to querry a date which only showing work week and year... i try in FORMAT([MYDATE], 'WW YYYY', 1, 2)... it work but when go to 31/12/2006 it showing "01 2006"... but suppose it should show "01 2007" how can i overcome this?

View 2 Replies View Related

Day Of Week Code

Aug 17, 2005

I have a "To Do" form that I've created using various DataAdd code to advance DueDates annually, monthly, weekly, etc.

Problem is I have a task that is due the second Monday of every month. I've been using If Statements but can't seem to get this to work since the second Monday isn't a even number. It could be different depending on how many days of the month there is.

Thanks,

ChiefRetired

View 1 Replies View Related

Chart By Day Of Week

Apr 2, 2005

I am new to Access and I am trying to use a chart in a report to display the injuries by day of week. Sunday thru Saturday. I am using a qry to pull the information from a tbl that we have entered the information into. I would like to use a Column Chart.

The problem is that it will display the day of week alphabetically and not Sunday -Saturday. I would also like the chart to display each day even thou there were no injuries for that specific day.

Any help would be greatly appreciated.

View 1 Replies View Related

Set First Day Of The Week In Calendar

Jul 30, 2007

I am currently using the calendar provided in Access 2003 in my project. Is there a way to define the first day of the week for the calendar using codes. Any help would be greatly appreciated.

View 2 Replies View Related

Help To Enter Value Based On Day Of Week

Jun 2, 2005

I have table that is used to collect roster information the date field is formatted dddd/dd/mm/yyyy a second field requires the end user to insert W to designate the entry as a weekend date. The end user's often forget to insert the W (not functional) I need a way to code the field to look @ date field and update itself with a W if [DateField] is a weekend date.

A query calculates the roster hours and * the hours field by 1.5 if the W is true. The query works fine, I just want to automate the "W"

Weekday Fn perhaps? Help anybody???

View 2 Replies View Related

Help To Convert Date To Week.

Aug 8, 2005

Hi,
I'm looking for a module wich converts a date to a week.
Ex: i type 08/02/2005 and i obtain Week #2
(Some years have 52 and other 53 weeks, depend on the date of the 1st week of the year, an other problem is that some people say the week begins the monday, other say it begins a sunday)
Maybe a built in fonction exists.
Thanks in advance for help.
VINCENT

View 9 Replies View Related

Best Setup For Custom Week?

Nov 14, 2005

Hi
I have a client whose working week runs from 0700h on Monday. They do a lot of overnight stuff and so have this cutoff. I am doing a time sheet db for them. All the time sheet records have a starting date and time, and an ending date and time. The end date defaults to the start date but can be updated if an overnight shift. I separated the date and time since I remember issues using the general date format.
I am puzzling over how best to organise my queries so that I can pull up weekly reports that tie in with their week criteria.
Do I build my own table with the date for Mondays over the next few years or is there some smarter way to identify Mondays and then say I want everything between 0700h on that Monday and 0659h the following Monday?
Any thoughts or pointers would be most appreciated.
Thanks and best wishes

View 2 Replies View Related

Week Of The Month Formula

Mar 3, 2006

I need a formula that will return the nth full week of the month that specified date falls in.

Example:
03/31/2006 would be "5" - the fifth full week of March
20/13/2006 would be "2 - the second full week of February

I've tried using a formula that subtracts the week number for the 1st of the month from the week number the date falls into, but it's just not working as I expect it to.

format([ETA],"ww",1) - format(date(format([ETA],"m",1) & "/01/" & format([ETA],"yy",1),"ww",1)

View 3 Replies View Related

Funktion For The Week Number

Oct 29, 2006

Hi,
I will really appreciate ur help. I work on Access-2000 database and have a problem. I need to get the number of the week. So i used the funktion as a standard value as following:
"=((Monat(Datum())*30,5-Tag(31-Datum()))/7)"
It shows me for today 39 instead of 44.
Could u please help me and tell me why this funktion doesnt work?
Thanks in advance

View 5 Replies View Related

Query By Week Beginning

Sep 6, 2007

I am trying to generate a Query by week always beginning on a Monday. I pick any date....and want all records in both printed version and chart version i,e, number of safety meetings attended vs number who should have attended for this week. I can enter data with todays date, well any day this week. Then at some future date ask for who attended this week and percentages (another story). Any ideas?

Nav4

View 1 Replies View Related

Week Number Problem

Jan 18, 2006

I have a large report that runs a six weeks average based on the last six weeks of production. Our fiscal year starts November 28th and our weeks starts on Monday.

I have used the following format to start the week on Monday

Week1: (DatePart("ww",[EntryDate],2))

To set up the fiscal year I used the following format in my query.

FiscalYear: IIf(Format([EntryDate],"mmdd")>"1127",DatePart("yyyy",[EntryDate])+1,DatePart("yyyy",[EntryDate])) . The criteria is 2006

I have a Weekending table that I have all the weeks listed including the weeks in calendar 2005 that are included in our fiscal 2006 that I have linked to my query.

When I run the report, it will not include weekending 1/1/06 (Week 1). It is totally eliminated. There is probably a conflict in the above formats, but I am not knowledgable enough in Access to figure it out. I have been searching this site without success. I would appreciate any help I can get. Last week I had to do the reports manually because I couldn't get the works to run right.

Thanks,

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved