Search
 
SCRIPT & CODE EXAMPLE
 

SQL

convert epoch to date in sql server

SELECT FROM_UNIXTIME(FLOOR(EPOCH_TIMESTAMP/1000)) FROM table; --if milliseconds
SELECT FROM_UNIXTIME(FLOOR(EPOCH_TIMESTAMP)) FROM table; --no milliseconds
Comment

sql server epoch to datetime

#--------------------------------SQL SERVER----------------------------------
#use this to convert forom bigint unix to datetime
#replace 1500123123 with your number
select  DATEADD(second,1500123123, CAST('1970-01-01 00:00:00' AS datetime))

#it's way better to put this in a function and call the function 
Comment

PREVIOUS NEXT
Code Example
Sql :: generate c# class from sql server table 
Sql :: how to list function in psql 
Sql :: sql drop primary key 
Sql :: bulk kill mysql processlist 
Sql :: oracle wait 
Sql :: import dump mysql 
Sql :: copy column data to another column sql with creating slugs 
Sql :: sql exclude duplicates and find even id 
Sql :: mysql created at yesterdau 
Sql :: drop column if exists sql server 
Sql :: oracle list next running jobs 
Sql :: show indexes mysql 
Sql :: mysql get first 2 characters of string 
Sql :: check database size in mysql 
Sql :: sql print all names that start with a given letter 
Sql :: add many column to sap iq table 
Sql :: sql where last 12 months 
Sql :: how to start mysql in terminal mac 
Sql :: create procedure with encryption 
Sql :: oracle set date format 
Sql :: mysql show carset 
Sql :: oracle db create new schema 
Sql :: postgresql transaction discard all 
Sql :: sql left join exists 
Sql :: how to change owner in postgres 
Sql :: create temporary table in mysql 
Sql :: mysql with rollup 
Sql :: transalations from sql to Linq count and group by 
Sql :: postgres convert text to number 
Sql :: MSSQL SYNTAX PROCEDURE FUNCTION TRIGGER 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =