473,785 Members | 2,440 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

First and Last Date for a given week and year???

Hello all,
Can anyone please tell me how to find the first and last
date of a week when the year and the week number is given?
The week model followed is the ISO model: Monday is the
1st day of the week and the 1st week should have atleast
4 days.
I got to see one thread on this topic, but it doesnt
work.. there are problems with it when an year has 52 or
53 weeks in it....

Any help would be welcome.

Benz.

Nov 20 '05 #1
2 3860
¤

"Benz" <be*********@ya hoo.co.in> wrote in message
news:62******** *************** *****@phx.gbl.. .
Hello all,
Can anyone please tell me how to find the first and last
date of a week when the year and the week number is given?
The week model followed is the ISO model: Monday is the
1st day of the week and the 1st week should have atleast
4 days.
I got to see one thread on this topic, but it doesnt
work.. there are problems with it when an year has 52 or
53 weeks in it....

Any help would be welcome.

Benz.

Nov 20 '05 #2
¤
I wasn't aware there was any year with 52 or 53 weeks in it...

"Benz" <be*********@ya hoo.co.in> wrote in message
news:62******** *************** *****@phx.gbl.. .
Hello all,
Can anyone please tell me how to find the first and last
date of a week when the year and the week number is given?
The week model followed is the ISO model: Monday is the
1st day of the week and the 1st week should have atleast
4 days.
I got to see one thread on this topic, but it doesnt
work.. there are problems with it when an year has 52 or
53 weeks in it....

Any help would be welcome.

Benz.


Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
9629
by: johkar | last post by:
I need to document.write out a select list populated with the dates for the first and third Wednesday of each month. How do I get to the actual days? <select name="mySelect"> <option value="Oct 1, 2003">Oct 1, 2003</option> <option value="Oct 15, 2003">Oct 15, 2003</option> .....and so on for a continual 12 month period </select> Thanks,
2
9563
by: John | last post by:
If anyone can help me out with a good way to do this in javascript I would greatly appreciate it. I need to compute three dates in javascript - all of which relate to a given date, say todays date. I need to calculate: 1. same day last year(that is, if today is friday, i want the date of the friday 52 weeks ago)
1
2889
by: Martin Emanuelsson | last post by:
Hello, Knowing year and weeknumber of this year, I'm looking for some way to get the date of the first and last day of that particular week. Does anyone have an idea about how to do this? Best regards Martin
0
2866
by: Lee Harr | last post by:
I wrote a function to return the first date of a given week (and a few related functions) : -- return the first date in the given week CREATE or REPLACE FUNCTION week_start(integer, integer) RETURNS date AS ' DECLARE pyear ALIAS FOR $1; pweek ALIAS FOR $2;
44
10236
by: user | last post by:
Hi, Let's say I have 2 dates in the b/m format: Date 1 and date 2 How do I check whether Date2 is later than Date 1? Date1. 21-Nov-2006 09:00:00 PM
6
4232
by: =?Utf-8?B?UGF1bA==?= | last post by:
HI I have a stored procedure that returns data with a date field in the form of a DateTime type. I need to place data in variables based on days of the week starting with the first thursday of the month. So the week would be week 1= (first thursday of the month through the next wed). So for example for July 07 the first thursday is july5th so the first week would be thursday july 5th , friday july 6th, sat july 7th, sun july 8th, mon...
0
2003
by: pratapmysql | last post by:
Hello All, I am trying to get same day (name) of week of last year in this case date of day is not constraint eg. if december 2007-12-19 day is wednesday ,then last year 2006 wednesday for same is on date 2006-12-20 here day is constarint. i.e. we need to match same day of that week . i have tried a stored procedure to find it, but it doest work as per expectation anyone has query in mysql to find same day of week of last year then help me...
4
10085
by: Charlotte | last post by:
Hi, is it possible to determine the first and the last day of a week (with classic ASP) nu = "06/01/2008" week = (DatePart("ww",nu)) firstday = dateadd("d",(-datepart("w",date())),nu) lastday = dateadd("d",(7-datepart("w",date())),nu)
0
9647
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
9489
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
10162
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...
0
9959
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7509
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
5396
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...
1
4063
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
3665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2893
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.