May 8, 2006 #1 misha8765 Instructor May 8, 2006 9 US Thank you in advance for your help. I have a date field 99/99/00 When I sort ascending in a query, it sorts the year first. I want it to sort by month then day. Any idea? Thank you
Thank you in advance for your help. I have a date field 99/99/00 When I sort ascending in a query, it sorts the year first. I want it to sort by month then day. Any idea? Thank you
May 8, 2006 1 #2 Golom Programmer Sep 1, 2003 5,595 CA Is the data type of the field a datetime field? If it is then the order you are seeing is the order that you get when you sort by the whole field. Try something like Code: Order By Month(DateField), Day(DateField) [small]No! No! You're not thinking ... you're only being logical. - Neils Bohr[/small] Upvote 0 Downvote
Is the data type of the field a datetime field? If it is then the order you are seeing is the order that you get when you sort by the whole field. Try something like Code: Order By Month(DateField), Day(DateField) [small]No! No! You're not thinking ... you're only being logical. - Neils Bohr[/small]
May 8, 2006 Thread starter #3 misha8765 Instructor May 8, 2006 9 US Thank you, Where exactly would I put this code. The format is datetime Upvote 0 Downvote
May 8, 2006 #4 Golom Programmer Sep 1, 2003 5,595 CA Switch to SQL view in your query and paste it in as the "ORDER BY" clause. Be sure to change the field name to the correct one for your query. [small]No! No! You're not thinking ... you're only being logical. - Neils Bohr[/small] Upvote 0 Downvote
Switch to SQL view in your query and paste it in as the "ORDER BY" clause. Be sure to change the field name to the correct one for your query. [small]No! No! You're not thinking ... you're only being logical. - Neils Bohr[/small]