I am having an issue in T-SQL that I can’t figure out. It’s related to the below formula but out of thousands of records it only fails on 1 with this error: Arithmetic overflow error converting expression to data type int.
SQL Formula:
CAST(DATEADD(s, CAST(LEFT(Trend_Date,10) as bigint), '1970-01-01 00:00:00') as date) as Date_Value
Problematic Trend_Date value = 2316639600000
There are a lot of posts and suggestions for this error but not specifically for an issue with one particular value which is the part I can’t figure out. Any help is greatly appreciated.