Sort by Summed Date

G

Guest

My query sums all shipments by month. So the date field is formated as:
ShipDate By Month: Format$([ShipDate],'mmmm yyyy')

I need to sort so the dates are in order, but it's seeing them as text and
sorting November, October, September instead of September, October, November.

How can I format this so it will sort correctly?
 
G

Guest

Pls disregard. I added an additional field in the query and formated it with
'mm yyy' and sorted by that field.
Thx anyhow
 
J

John Spencer (MVP)

Glad you solved it, but you might consider what happens if you cross year
boundaries and change that to

SortDate: Format(ShipDate,"yyyy-mm")
Pls disregard. I added an additional field in the query and formated it with
'mm yyy' and sorted by that field.
Thx anyhow

neenmarie said:
My query sums all shipments by month. So the date field is formated as:
ShipDate By Month: Format$([ShipDate],'mmmm yyyy')

I need to sort so the dates are in order, but it's seeing them as text and
sorting November, October, September instead of September, October, November.

How can I format this so it will sort correctly?
 
G

Guest

Thank you for the input, I'll change it as you suggested
Janine

John Spencer (MVP) said:
Glad you solved it, but you might consider what happens if you cross year
boundaries and change that to

SortDate: Format(ShipDate,"yyyy-mm")
Pls disregard. I added an additional field in the query and formated it with
'mm yyy' and sorted by that field.
Thx anyhow

neenmarie said:
My query sums all shipments by month. So the date field is formated as:
ShipDate By Month: Format$([ShipDate],'mmmm yyyy')

I need to sort so the dates are in order, but it's seeing them as text and
sorting November, October, September instead of September, October, November.

How can I format this so it will sort correctly?
 

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

Top