Their are many ways of achieving this
1. Use of
BETWEEN[
^]
select userid,loginDate from tblname where loginDate BETWEEN FromDate AND ToDate
2. Simply compare the two dates with the specified one
select userid,loginDate from tblname where loginDate<=ToDate and loginDate>=FromDate
3. Use
DATEDIFF()[
^] function which returns an integer value i.e. count between two dates