Query Question



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?



Jeff Boyce

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.


Jeff Boyce
Microsoft Office/Access MVP

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads