Hey!
I have date that shows up every minute. I want to sort out the average for avery hour. I think that i need to do this in a Query but when i do this I use the function 'FORMAT' so then my data wont sort cronological. So i tried usint "DateValue()" but the it sorts the data per day and not per hour anymore. How can I fix this.
Thanks a lot!
Here is the SQL code that i am trying out:
Code:
SELECT DISTINCTROW (Format([Control1].[P21 Q Time],'ddddd hh:00')) AS [P21 Q Time per dag], Avg(Control1.[P21 Q ValueY]) AS [Gem Van P21 Q ValueY]
FROM Control1
GROUP BY (Format([Control1].[P21 Q Time],'ddddd hh:00'));
then I get this (so the data alphabetical):
And when i try this :
Code:
SELECT DISTINCTROW DateValue(Format([Control1].[P21 Q Time],'ddddd hh:00')) AS [P21 Q Time per dag], Avg(Control1.[P21 Q ValueY]) AS [Gem Van P21 Q ValueY]
FROM Control1
GROUP BY DateValue(Format([Control1].[P21 Q Time],'ddddd hh:00'));
It is like this