Link to home
Start Free TrialLog in
Avatar of Dwhite
Dwhite

asked on

Select Distinct day from a Datetime field

Hi all.
Can anybody please help I am having trouble selecting distinct days from a datetime field.
I can do it in access ie.
SELECT DISTINCT Format([fldLogTime],"dd/mm/yyyy") AS [Date] FROM tblLog;
but can anyone please convert this to SQL for me.
Thanks
Dean.
ASKER CERTIFIED SOLUTION
Avatar of Dishan Fernando
Dishan Fernando
Flag of Malaysia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
OR try this ..

SELECT CONVERT(varchar(10), fldLogTime ,103)  AS [Date]
FROM tblLog
GROUP BY CONVERT(varchar(10), fldLogTime ,103)
Avatar of Dwhite
Dwhite

ASKER

Thanks a lot
Avatar of Dwhite

ASKER

Thanks a lot