[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql-win32
Subject:    RE: simple question
From:       jbonnett () sola ! com ! au
Date:       2005-11-29 22:59:12
Message-ID: CDD2448EDE5CAE4499CA5828A4CAF788B9CA29 () pine ! ap ! sola ! com
[Download RAW message or body]

I would thing that given: -
- the day of week of the start date
- the day of week of the finish date
- the number of weeks between the start and finish dates
You could create some logic to figure how many, say Tuesdays, occur between
the two dates.
If there are 10 whole weeks then there would be at least 10 Tuesdays. There
may be, I think, at most one more depending on the day of week of the start
and finish. It might be that you only add one if both the start and finish
are Tuesdays. You certainly don't need a database to answer this question!

The MS DateDiff functions can give you date differences in weeks and I am
sure there are equivalent functions on other systems. Anyway you can always
find the days between two dates and divide by seven to get the answer.

John B.

-----Original Message-----
From: ascll [mailto:ascll@yahoo.com] 
Sent: Saturday, 26 November 2005 12:38 AM
To: win32@ lists.mysql.com
Subject: simple question

Greetings,

How to we know how many Tuesday within a predefined
time frames, say

Number of Monday between 1 Jan 2005 until 31 Aug 2005
OR
How many Saturday between 13 Feb 2005 until 17 May
2005

Thanks.


	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


-- 
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe:    http://lists.mysql.com/win32?unsub=mysql-win32@progressive-comp.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic