473,657 Members | 2,686 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Translating Dates into a week of and a grouping header

17 New Member
I need to be able to group date field by week. I can identify the week but I need to translate the ww into a date. For example; if the date falls in the 5th week of the year, I want to group all the dates that fall in week (jan 28 though the Jan 31) all together. Does anyone have work around solution or know what functions I could use in a query or report. I have done with using the Monthname function but can't find a similar function for week of. Thank you
Jul 10 '07 #1
2 1590
kepston
97 Recognized Expert New Member
Try this:
Expand|Select|Wrap|Line Numbers
  1. Week:[Your_date_field]-Weekday([Your_date_field],1)
Look up the help file for Weekday, to get the correct start day for your week.
Jul 10 '07 #2
egrill
17 New Member
Thank you. It worked perfectly.
Jul 10 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

9
6561
by: mchen716 | last post by:
Hi, I have the following query: SELECT p.employee_code, p.employee_name, CONVERT(VARCHAR(12),t.tran_date,101) AS TranDate, CONVERT(VARCHAR(12),t.post_date,101) AS PostDate, SUM(tobill_hrs) AS TotalHours FROM tat_time t, hbm_persnl p WHERE t.tk_empl_uno = p.empl_uno AND t.tran_date BETWEEN '2005-03-01' AND '2005-03-31' AND p.employee_code IN ('0340')
5
3295
by: Bullschmidt | last post by:
If I know the week number and the year, how can I calc the beginning and ending dates of the week? For background I'm going to do some grouping by week but don't just want to call the weeks Week 25, Week 26, Week 27, etc. Thanks in advance, J. Paul Schmidt, Freelance Web and Database Developer http://www.Bullschmidt.com Access Database Sample, Web Database Sample, ASP Design Tips
4
2477
by: Brian Coy | last post by:
I have a database that records a part no, a scrap reason, the cost of scrapping that item, and the date. I need to porduce a report that will show up to a weeks worth of data at a time, but I need each dates scrap amout totaled and each day to be separated on the report. I am self taught at access and still a beginner, so please be gentle on your replys. Thanks for your time in advance...
4
1736
by: Alicia | last post by:
I am having a problem grouping by week. I am looking for the simpliest way of doing it in Microsoft Access. I have tried to use a pre-loaded calender, access did not like it at all. If there is another way of counting the number of ProblemCounts with a single week, by using DatePart etc. Give me a shout. Thanks. Something similar to Before:
3
2730
by: ahaque38 | last post by:
Hello. Using A2K SP3, I am having the following problem with a report using "Sorting and Grouping". I have recently added a grouping in the reports for "Category2<>'CONTRACTS'". I have reports at the plan (overall totals), department and division levels which have sorting and grouping implemented with this new
1
2139
by: Alicia | last post by:
I basically wanted something that would do a count of the dates, then group them by their week name.. BEFORE: Resource Date Total number of times that date Appeared (Count) 4/3/03 4 4/4/03 2 (note 4/4/03 showed up twice) 4/9/03 1
1
1584
by: John | last post by:
I'm building a report where each row represents one month and its 1 to 5 weeks. A report query groups the source table date into a "month and year" expression. A subreport links to the main report using the query's "month and year" expression. Problem is I can't figure out how to group the source table's dates into a "Mmmm yyyy" and then link the subreport to the relevant week of that "Mmmm Yyyy". source table:
3
3271
by: Patonar | last post by:
Hi, I have a query which works out which orders are due to be delivered in a particular week. I would like to display this by week commencing which i can do with the following WHERE condition in the date field: <=(Date()) And >DateAdd('d',-5,(Date())) Now the customer would like to be able to see the previous six weeks data on the same report - i know i can find out the previous weeks
1
1269
by: David | last post by:
Hi, I need to set up an HTML table or the like, with 4 columns. Each column needs to have a header with a FRIDAY (dd/mm/yy) date. i.e. this weeks Fridays date is 16th Feb, the following is 23rd Feb etc. So, I need column 1 to be headed 16th Feb, col 2 to show 23rd Feb etc. As this week passes, the dates need to move up 1 week, so that next week, col 1 will display 23rd Feb and so on.
0
8407
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8739
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8512
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6175
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5638
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4171
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2739
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.