Reputation: 193
Table have one column which contain timestamp value.I want to convert that timestamp value to date&time in SQL.
When I using like this
select cast(1520339311 as datetime)
I'm getting an error:
Arithmetic overflow error converting expression to data type datetime
How to handle that?
Upvotes: 0
Views: 20962
Reputation: 21
SQL Server's TIMESTAMP datatype has nothing to do with a date and time! See the links Below:
CAST and CONVERT (Transact-SQL)
Upvotes: 1