473,395 Members | 1,468 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,395 software developers and data experts.

Translating Dates into a week of and a grouping header

17
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 1575
kepston
97 Expert
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
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
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...
5
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...
4
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...
4
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...
3
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...
1
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 ...
1
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...
3
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...
1
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...
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
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...
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.