Sorting by week

  • Thread starter Thread starter omairiq
  • Start date Start date
O

omairiq

I am converting dates into year-week format in access bu this command
format([date],"yyyy"&"-"&"ww")

problem in sorting this is column is that 2009-2 comes after 2009-19 and so
on

how can I add week as 01,02 and 03 so that it gets sorted correctly

thanks
 
Thanks patrice

But is there any other way of converitng it other than format, all i want is
to sort it as number not text and i cant put it back into a table as i m
using a query on the form to make chart.



Patrice said:
Format creates a string so text sorting rules are applied. You should still
sort on the date field rather than on the format function result...

Not sure about the context but if you are doing so in a query, I would
recommend to let the query return the data in their "native" format and
handle display formatting on the control that display this particular
column...

--
Patrice

omairiq said:
I am converting dates into year-week format in access bu this command
format([date],"yyyy"&"-"&"ww")

problem in sorting this is column is that 2009-2 comes after 2009-19 and
so
on

how can I add week as 01,02 and 03 so that it gets sorted correctly

thanks
 
Back
Top