Hi all. I'm very new at sql so first I hope I'm posting in the right place. I'm using ms access until I hone my skills so here goes:
Each week a different member of my website contributes to our mp3 collection. I have a schedule that I made in javascript but I need to manually change it every week. What I would like to do is populate an access table with every Sunday date from now to 2008 and then create a query that will use the current date() and display who's week it is.
Is this possible?
I'm grappling with the DateAdd and DateDiff functions but I'm not a good enough programmer or I don't think programmatically enough to work out how to do this.
What I have now is:
Code:
SELECT tblRotaion.RotationWeek, tblRotaion.Member
FROM tblRotaion
WHERE (((tblRotaion.RotationWeek)<=Date()));
Which returns:
Code:
RotationWeek Member
3/25/2007 Many
3/18/2007 Moe
3/11/2007 Jack
All I want to return however is the most recent Sunday not all Sundays in the past. Then next week, 4/1/07 will be a new person.
Thanks in advance.