Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: database date fields
Jonathan,
> You can use the TRUNC function to do this. For example: select
trunc(sysdate) from dual;<
PMJI?
Do you know if it is possible to do any calculations on the dates?
For example:
I have a table with measurement values, taken every 5 minutes 7 days a
week.
I would like to have a sum of these for every _hour_ in the day.
I have tried
GROUP BY M.METER, ( TO_CHAR((M.SAMPLETIME), 'YYYY-MM-DD HH24') );
but that will give me values from 0:55 to 1:55, 1:55 to 2:55 etc.
Best regards
Henrik Staun Poulsen Received on Mon Aug 03 1998 - 07:18:08 CDT
![]() |
![]() |