I am trying to get days difference between 2 days and I am getting below error. Could any one please help
CONVERT(DECIMAL,((dbo.convertToUnixTime(GETDATE())-p.CREATEDDATE)))
Msg 8115, Level 16, State 2, Line 79
Arithmetic overflow error converting expression to data type datetime.
dbo.convertToUnixTime? Why are you defining your value as justdecimal, where the precision and scale? Why do you appear to be subtracting a date away from another? Dates aren't numbers, it doesn't make sense to "subtract"2020-09-17T19:12:59.462from2020-09-25T10:47:04.123.