473,778 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Translating the serial number of calendar week into "week of _______

17 New Member
I have figured out how to extract the serial number of date field into the corresponding number of the week using the DatePart function. The would like to take the 5 and translated it identify the week of associate with the series. For example if the serial number was 5 it corresponds the the fith week in January which is the week of January 28th. Does have a work around or knowledge of the next steps to get this information. Thank you

Expr1: DatePart("ww",[ORDER_DATE])
Jul 9 '07 #1
8 2511
Rabbit
12,516 Recognized Expert Moderator MVP
If I understand correctly then you can get the day of the week, subtract it from the date and that'll give you the first date of the week.
Jul 9 '07 #2
egrill
17 New Member
If I understand correctly then you can get the day of the week, subtract it from the date and that'll give you the first date of the week.
Thank you. I think that would just cause the date to change. I need to sort so I can have the records within the same serial (week) together. Thank you again for the assistance.
Jul 9 '07 #3
Rabbit
12,516 Recognized Expert Moderator MVP
You don't have to change the value, you can either sort by a calculated value or create a calculated column and sort by that.
Jul 10 '07 #4
tcveltma
36 New Member
Would you mind elaborating a little?

Rabbit
You don't have to change the value, you can either sort by a calculated value or create a calculated column and sort by that.
Thanks,
Tiffany
Jul 11 '07 #5
missinglinq
3,532 Recognized Expert Specialist
I'm not sure of exactly what you're trying for, but if it's to identify the first day of the week that a given date falls in, something like:

Expand|Select|Wrap|Line Numbers
  1. WeekOF = "Week of  " & Order_Date-(weekday(Order_Date)-1)
Jul 11 '07 #6
Rabbit
12,516 Recognized Expert Moderator MVP
I'm not sure of exactly what you're trying for, but if it's to identify the first day of the week that a given date falls in, something like:

Expand|Select|Wrap|Line Numbers
  1. WeekOF = "Week of  " & Order_Date-(weekday(Order_Date)-1)
Similar to what linq is proposing except for sql:

Expand|Select|Wrap|Line Numbers
  1. WeekOf: "Week of " & Order_Date-(weekday(Order_Date)-1)
This in no way changes the value in the table. It's just a calculation that gets performed whenever you run the query and you view the results.
Jul 11 '07 #7
egrill
17 New Member
Thank you it worked just great. Thank you for the assistance
Jul 11 '07 #8
Rabbit
12,516 Recognized Expert Moderator MVP
Not a problem, good luck.
Jul 11 '07 #9

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

Similar topics

7
15149
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 attached), yet when I ran it for 28/09/2003 (UK date format) it returned Week 39. I would have expected it to return Week 40. However, I'm really stuck and my head is busting over this, so any pointers would be gratefully appreciated. Many thanks...
9
3420
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 period and 13 periods a year. normally 52 weeks per year but one 53-week a year every 6 years. The 53th week is included in period 13. Can someone advise any idea how to construct such conversion.
0
1024
by: Toni Pohl | last post by:
Hi all, I use the calendar control of asp.net 1.1. I want to insert an extra column for the calendar week. Is there a (simple) way to insert a column? I didn´t find a method, not even in the PreRender Event or in the control itself. I would need the right idea...! Does anybody have a tip for me how to reach this?
2
1791
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 the purposes of grouping the data. However, my users would rather that I display the number of the week in the period they've selected. If, for instance, they select 2/1/2006 to 2/28/2006, they want to see "Week 1," "Week 2," "Week 3," etc....
1
2609
by: sloan | last post by:
Ok, maybe the asp:calendar doesn't do it. Anyone know of a codeproject (or similar) place that has a Web ~Server Control .. which displays a week, (not a month as the default asp:calendar does) and has a similar DayRender event? Thanks....
6
25367
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 1953 I checked the algorithm it is very correct.
1
2065
by: JoeyMaac | last post by:
Hello. I need to find a way to sum data by calendar week. For example, I receive sales and shipping data from various days during the week. I need to be able to sum this data to get a single value for each software title for each week. This data spans over several years. Any help would be greatly appreciated. Thank you.
3
3826
by: dponce | last post by:
Hello Forum, I will try to be as detailed as possible, I feel you would better understand what I am trying to do if I could email or upload the database to you all instead. If there is a way to upload, could someone tell me how this is done? What I have been working on is a database that will help schedule a maintenance departments personnel based on a 52 week calendar. This is where I am stuck and was hoping someone could give me some...
14
19073
by: Tommy Jakobsen | last post by:
Hi. Is there a method in .NET that takes "year" as an argument and returns the total number of weeks in that year? For culture da-DK (Danish). Thanks in advance. Tommy.
0
9629
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
9470
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10127
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
10069
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
7475
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
6723
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
5500
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4033
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
3627
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.