SQL Query Error

The query had to be modified to put the date in the correct format:

SELECT intvalue, dateadd(s,t_stamp/1000,‘1970-01-01 00:00:00’) as t_stamp from MyDB.dbo.sqlt_data_1_2014_07
where cast(dateadd(s,t_stamp/1000,‘1970-01-01 00:00:00’) as datetime) >= ‘{Root Container.Date Range.startDate}’
and cast(dateadd(s,t_stamp/1000,‘1970-01-01 00:00:00’) as datetime) <= ‘{Root Container.Date Range.endDate}’
and tagid = 29

1 Like