sorting records by week

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi!
i want to sort my records in database by week number like 10th week of the
year etc.i want the records to be displayed if i give the week number.if i
give 23 all the records in the 23rd week of the year should be
displayed.whats the best way to achieve this.
thank you.

byee
 
Well one way of doing this is to use a query instead and add create a field
in that query like this:

Week: DatumPart("ww";[NameOfYourFieldHoldingDate])

Then sort this field ascending and you will have your data sorted by the
week. The field (or rather column) in the query will now have the name
"Week".

// Niklas
 
i want to sort my records in database by week number like 10th week of the
year etc.i want the records to be displayed if i give the week number.if i
give 23 all the records in the 23rd week of the year should be
displayed.whats the best way to achieve this.

SELECT stuff
FROM YourTable
ORDER BY WeekNum([YourDateColumn], 1)


--
Peace & happy computing,

Mike Labosh, MCSD

"Mr. McKittrick, after very careful consideration, I have
come to the conclusion that this new system SUCKS!"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top