Query Question

  • Thread starter Thread starter kathekas
  • Start date Start date
K

kathekas

I have a table called simpleweather, and the 2 fields I am interested in are

datadate which is the date in the format dd,mm,yy hh.mm
outdoors which records the temperature eavery minute

I want to recover the max(outdoors) for each day.

SELECT Left(simleweather.datadate,10) AS Expr1, Max(simpleweather.outdoors)
AS MaxOfoutdoors
FROM simpleweather
GROUP BY simpleweather.datadate;

Please can some assist?
 
If your date/time field holds date/time values, using GroupBy will group by
the date/time value, not the date-only value.

Create a query, add in a new field, something like:
NewField: DateValue([datadate])
then GroupBy that field.

By the way, since the way Access stores date/time data is actually
xxxxx.yyyyy, your use of the Left() function won't help unless you can get
to just the date portion. You may be confusing how the data is displayed
(i.e., formatted), with how Access stores the data.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top