How to sort a Format ([DateAudited],"yyyy"", week ""ww) field by w

G

GillesABelanger

I need to convert the date using the format in the header, however when I try
to sort the date using the ascending or descending option, it behaves like a
string. Week 11 comes before week 2? Is there a way to sort the formatted
date (converted to week number) in the correct order?

Thanks a lot
 
R

Rick Brandt

GillesABelanger said:
I need to convert the date using the format in the header, however when I try
to sort the date using the ascending or descending option, it behaves like a
string. Week 11 comes before week 2? Is there a way to sort the formatted
date (converted to week number) in the correct order?

Include both a formatted date (string) and an unformatted date and sort on the
unformatted one.
 
G

GillesABelanger

Thank you for your prompt answer.This is a query of queries. The first two
queries are totals (crosstabs) queries. I have tried what you are
suggesting, but then I need to select "First" as the total option to order my
data by week. This works for the first level of queries, however, when I do
the query of the two queries, it acts as a filter and I see no more data!
Any other suggestions?

Thanks
 
G

GillesABelanger

Applying that principle (using the date to sort with First as the option in
the total line) to both queries is working just fine. Thansk a lot.
 

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

Similar Threads

Get date for start of week 3
Month of year in code 2
Sort Week day 2
Week numbers 2
Week number 1
Week numbers 0
Convert week "number" to actual number to sort it in column headin 2
Report sorting function 2

Top