Feb 11, 2011

get Month from date Column

select to_char(open_ts,'yyyymm'),count(*)
from table name
group by to_char(open_ts,'yyyymm')
order by to_char(open_ts,'yyyymm')
or select to_char(sysdate,'mm') from dual;

No comments:

Post a Comment