Query help

  • Thread starter Thread starter Darryl
  • Start date Start date
D

Darryl

Greetings,
I have a table that has multiple fields Two of the fields are status
(number) and tdate(datetime).

so records would be like:
2 1/15/2005 7:30:00am
2 1/15/2005 7:31:00am

How do I return one record for each given date (ie, ignoring the time) ?
The table is generated from another application so I cannot change the table
format.

so, the query should return:
1/15/2005
given the above example.

thanks,
D
 
Change "EventSched" to your table name.
This returns one date per day --
SELECT Format([tdate],"m/d/yyyy") AS Expr1
FROM EventSched
GROUP BY Format([tdate],"m/d/yyyy");

This returns one status-date per day --
SELECT EventSched.status, Format([tdate],"m/d/yyyy") AS Expr1
FROM EventSched
GROUP BY EventSched.status, Format([tdate],"m/d/yyyy")
ORDER BY Format([tdate],"m/d/yyyy");
 
Back
Top