Sort by Summed Date

  • Thread starter Thread starter Guest
  • Start date Start 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?
 
Pls disregard. I added an additional field in the query and formated it with
'mm yyy' and sorted by that field.
Thx anyhow
 
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?
 
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?
 
Back
Top