date format - Oracle: group by month -
i have such problem, working oracle database. in 1 of tables there column in timestamp format 06.01.14 08:54:35
must select data grouping column month. result of query column if 06.01.14
must jan.2014
in mm.yyyy
format, tried such query
select to_char(ctime,'mm.yyyy') table_name
but result not in date format, string format. not to_date
function
can me
of course variation on to_char result in string format. that's does. are, think, confusing how value displayed , data type behind it.
now if have date field can use
trunc(ctime,'mon')
which truncate first of month , leave in date format. how display you. if expecting date value not have day/hour/minute/second component - i'm afraid don't understand data type.
Comments
Post a Comment