So what exactly the issue? you given 1-1-2013 and 31-1-2013 and its giving the data.
Also spcify where you are fetching data ? SQL? If yes, you may have to use correct operator. For example
select * from table1
where
date < endDate and
date > startDate
Hope that helps
Milind