Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Date format conversion
On Thu, 04 Jan 2001 19:37:37 GMT, clewis_at_epylon.com almost coherently wrote:
>I'm currently selecting and grouping by a datetime field, which of
>course is listing each row individually.
>
>If I want to group by just the day, what is the syntax for formatting
>the datetime field to return the date without the time? And isn't this
>done in the select statement?
SELECT TRUNC(mydate) , COUNT(*) FROM mytable GROUP BY TRUNC(mydate);
-- Mark Styles - Oracle/Unix developer and DBA http://www.lambic.co.ukReceived on Thu Jan 04 2001 - 15:05:51 CST