Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Date format conversion

Re: Date format conversion

From: Mark <cdo_at_lambic.co.uk>
Date: Thu, 04 Jan 2001 21:05:51 GMT
Message-ID: <3a54e54d.104532108@news>

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.uk
Received on Thu Jan 04 2001 - 15:05:51 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US