View Full Version : group by date but ignore time???


BRABUS
02-05-2009, 06:30 AM
Hi I have created a query that produces exactly what I want and from that I then run a report. This is great until I then want to group the report by date.

The table that the info comes from has the date created by the now() command so its in the dd/mm/yyyy hh:mm:ss

If I group on the date field then it does it for every time event. So If I have 500 entries for one day it will group them as individuals as the time is different.

How can I group on dates only and also how can I assure that its using the UK dd/mm/yyyy format.

Cheers

pbaldy
02-05-2009, 07:14 AM
Try

Format(DateField, "short date")

Pat Hartman
02-05-2009, 10:11 PM
Rather than formatting dates, it is better to use the correct date function so that the field retains its date-like properties. Use DateValue() to get just the date part and TimeValue() to get just the time part of a date/time field.

BRABUS
02-17-2009, 02:34 AM
Cheers Pat, that sorted it.