Sort by Summed Date

N

neenmarie

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?
 
N

neenmarie

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?
 
N

neenmarie

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?
 
Top