This forum is for SQL Develper questions only. Mark this question ANSWERED and repost it in the SQL and PL/SQL forum SQL and PL/SQL
SELECT col1,col2 FROM bill WHERE
trunc (TO_DATE(time_stamp, 'yyyy/mm/dd HH:MI:SS AM') = trunc (TO_DATE('2012/01','yyyy/mm');
This only returns data for first day of the month and need data for a month.
Well a TRUNC without a format string only gives you one day. If you want to trunc to the month you need a 'MM' format string.