Can anyone help please?
I have a group by query and trying to have the result sorted by year-week.
Tried Val(Right(Format$([Order_received],'yyyy/ww'),Len(Format$([Order_received],'yyyy/ww'))-5))
If my query tests for the date range from Nov 2020 till May 2021, if I sort by week only, then last year's weeks appear at the end , i.e., 14, 15, 16, 48, 49, 50
Tried different versions including datepart but not resolving the issue.
Would like it to sort 51, 52, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, etc.
Hope someone can help!
Harris
I have a group by query and trying to have the result sorted by year-week.
Tried Val(Right(Format$([Order_received],'yyyy/ww'),Len(Format$([Order_received],'yyyy/ww'))-5))
If my query tests for the date range from Nov 2020 till May 2021, if I sort by week only, then last year's weeks appear at the end , i.e., 14, 15, 16, 48, 49, 50
Tried different versions including datepart but not resolving the issue.
Would like it to sort 51, 52, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, etc.
Hope someone can help!
Harris