Hi, You can try this
@FromDate datetime,
@ToDate datetime
DECLARE @query nvarchar(max)
set @query='SELECT [col1]
FROM [Table1]
WHERE ([col2] BETWEEN '''+CONVERT(NVARCHAR, @FromDate,21)+''' AND'''+CONVERT(NVARCHAR, @ToDate, 21)+''')'
execute sp_executesql @query