PDA

View Full Version : need help with week function


mmcleod
01-15-2004, 06:51 PM
I have a series of records that I need to sort by the week they were submitted. I'm trying to submit a query to do that, but it's not outputting any results:

SELECT * FROM SessionInfo WHERE Date=WEEK(50);

How do I get something like this to work? The dates are currently in the YYYY-MM-DD format. Any help would be greatly appreciated!!

Mike

raf
01-15-2004, 08:11 PM
Welcome here!


I have a series of records that I need to sort by the week they were submitted
So just order them on the date, which is the same as ordering on the week they were in.

SELECT var1, var2, var3 FROM SessionInfo ORDER BY date asc;

I don't see the link between your question and the code you used.

Also --> never use select * . Not even if you realy need all variables. If you later add variables you don't need here, then your recordset will be to big and you'll hav unnescecary trafic.