Hi,
declare @tempStartDate datetime
declare @tempEndDate datetime
select @tempStartDate = convert(datetime, @InputStartDate)
select @tempEndDate = convert(datetime, @InputEndDate)
select * from dbo.TempTable where fromDate >= @tempStartDate and toDate <= @tempEndDate
Hope this helps.
Happy coding..!!