How about "adddate(20050101, INTERVAL 7*23 DAY)" for getting a date in week 23?
> -----Original Message----- > From: Eric Jensen [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 13, 2005 4:29 PM > To: mysql@lists.mysql.com > Subject: Re: Getting first and last day of week > > John Trammell wrote: > > > >>Playing around with the date/time functions, I came up with: > >> > >>select subdate(now(), INTERVAL weekday(now()) DAY); > >>select adddate(now(), INTERVAL 6-weekday(now()) DAY); > >> > >>So once you have a date in the desired week, it's easy to > calculate the > >>first/last days in that calendar week. > >> > >> > >> > > > > > I can think of a lot of ways once I have the date, that's not > really the > problem. All I have is a week number, I.E. 23, 24, 25, etc. > I need to > find out some dates they correspond to and I'm not sure how > to do that. > > Eric > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]