sql - Grouping by month using a date column (DD.MM.YYYY HH24:MI:SS) -


i trying create monthly report easy review , comparison of runtimes of processes.

the raw data needed stored in oracle 11g database table, runtime being difference between startdate , enddate both formatted dd.mm.yyyy hh24:mi:ss.

one dateset created each run of process, there huge number of them stored in table (several datasets per process per hour).

now pretty straight forward using group by clause, however, couldn't work in case. due date columns being involved special format.

is there possibility group data sets month stored within startdatecolumn? tried using oracle date functions found via googling, e.g. month() , extract() , far didn't anywhere it.

i appreciate hints regarding issue.

thanks in advance , best regards, dazza

to dates month in oracle can convert part string , use this:

select    to_char(startdate, 'yyyymm') startmonth,   .... ... group to_char(startdate, 'yyyymm'); 

Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -