I imported some tables from MYSQL and the date columns stored in MYSQL tables were in UNIX DATETIME format. How can I convert a unix date time value to DATETIME format in SQL ?
Unix time represents date as a number which is the different in seconds from 1970-01-01 to the specified date. So you can add the unix number as seconds to 1970-01-01 to get the actual date
declare @unix_time int set @unix_time=9802983 select dateadd(second,@unix_time,'19700101')
Managed Windows Shared Hosting by OrcsWeb