I have a table that has a field Report_Date. This field is a bigint type. I have another table that has ReportDate that is datetime type. I want to combine data from each table, but I want the bigint converted into a datetime.
I tried SELECT DATEADD(DD, convert(bigint, Report_Date), Report_date)
however I get the error message:
Arithmetic overflow error converting expression to data type datetime.
I have also tried SELECT DATEADD(DD, convert(bigint, Report_Date), convert(datetime, Report_date))
with the same error message result.
I expect the date time to be 2019-02-28 00:00:00.000
.