
i need to get select count(*) from leavetable where empid=400 in between two dates from timestamp colomn please help me
for eg:2011-06-01 10:49:01 and 2011-06-30 10:49:01

Use the following query:
select count(*) from leavetable where empid=400 and dt BETWEEN '2011-06-01 10:49:01' AND '2011-06-30 10:49:01';
where dt is the datetime field.