Connect your existing Source Control system to SSMS in 5 minutes
Getting started with SSIS - Part 1: Introduction to SSIS
First Time? You can support us by signing up. It takes only 5 seconds. Click here to sign up. If you already have an account, click here to login.
Loading

Ask in the public forum

Ask your questions in a public forum

My Blog Posts

Write SQL amazingly fast with SQL Prompt
  • How can I convert a UNIX DATETIME value to DATETIME value ?

    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 ?

    anil
    82 · 3% · 448

1  Replies  

Subscribe to Notifications
  • 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')
    
    Madhivanan
    3 · 34% · 5789

Your Reply


Sign Up or Login to post an answer.

Managed Windows Shared Hosting by OrcsWeb

Copyright © Beyondrelational.com