If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Month query / View
I have a table that have a field that holds dates and i have name it as "Mera" , now i want to make a query to
show me the products from that table in a year but in month segments i wrote in a query field the follow : Month: Year([Mera]) & "-" & Month([Mera]) {and also group by, and asceding} everything works fine but! when i go and make a chart out of this the data is there but the thysical order of the months is gone... is something like 2004-1,2004-10,2004-11,2004-12,2004-2,2004-3 etc is there something so i can corectly sort the data? It is so important to me Thank you for your time to help me, Sotiris Stroungaris |
#2
|
|||
|
|||
Month query / View
Sotiri,
This is happening because the expression Year([Mera]) & "-" & Month([Mera]) returns a text, so it is sorted as such. Try something like: Format([Mera],"yyyy-mm" instead. This will retain the date/time type of the original field, so your sorting will be correct. HTH, Nikos "sotiris_s" wrote in message ... I have a table that have a field that holds dates and i have name it as "Mera" , now i want to make a query to show me the products from that table in a year but in month segments i wrote in a query field the follow : Month: Year([Mera]) & "-" & Month([Mera]) {and also group by, and asceding} everything works fine but! when i go and make a chart out of this the data is there but the thysical order of the months is gone... is something like 2004-1,2004-10,2004-11,2004-12,2004-2,2004-3 etc is there something so i can corectly sort the data? It is so important to me Thank you for your time to help me, Sotiris Stroungaris |
Thread Tools | |
Display Modes | |
|
|