I have a column in startTime
in my table which is an epoch time. I want to impose date between condition for give date.
SELECT
*, DATEADD(SECOND,startTime,'1970-01-01')
FROM
[dbo].[State]
WHERE
startTime BETWEEN DATEDIFF(s,'19700101 05:00:00:000','12-01-2015')
AND DATEDIFF(s,'19700101 05:00:00:000','13-01-2015')
Here startTime
is unix time column