Select userid, timeenrolled
,CASE WHEN timeenrolled is not NULL THEN Convert(Varchar, dateadd(S, CAST(timeenrolled as int), '1970-01-01'), 101) else '' end as DateEnrolled
from Course
I am getting "Arithmetic overflow error converting expression to data type int" exception while converting int to date.
I figured out the value which is -2208988800. How do i ignore this value in my above query