[SQL Server] Unix Timestamp to datetime
DECLARE @UnixTimestamp bigINT, @LocalTimeOffset bigINT;
SET @UnixTimestamp = 1706829780000/1000;
SET @LocalTimeOffset = DATEDIFF(second,GETUTCDATE(),GETDATE());
SELECT dateadd(second, (@UnixTimestamp + @LocalTimeOffset), '1970-01-01') at time zone 'Tokyo Standard Time';