sorting records by week

S

sudaxl

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
 
N

Niklas Östergren

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
 
M

Mike Labosh

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!"
 
Top