Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql server convert date to int

SELECT CONVERT(INT, CONVERT(DATETIME,'2013-08-05 09:23:30'))
or
SELECT CONVERT(INT, CAST ('2013-08-05 09:23:30' as DATETIME))
Comment

PREVIOUS NEXT
Code Example
Sql :: jooq convert using gbk 
Sql :: mysql date between two dates 
Sql :: mysql show foreign keys 
Sql :: oracle alert log location 
Sql :: psql count where not null 
Sql :: mysql return text after a final full stop 
Sql :: altering the column name in MySQL to have a default value 
Sql :: check message id sql server 
Sql :: moodle query item quiz 
Sql :: oracle list tablespaces 
Sql :: oracle show trigger code 
Sql :: check constraint to check if date greater than todays date 
Sql :: role does not exist psql 
Sql :: mysql column start with string 
Sql :: postgresql show owner of database 
Sql :: mysql select for update ejemplo 
Sql :: remove password from root mysql 
Sql :: change name of colum in sql table 
Sql :: convert series number to date in sql 
Sql :: ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement 
Sql :: group concat with separator 
Sql :: mysql update table from select on another table 
Sql :: How to View column names of a table in SQL 
Sql :: postgres format date in select 
Sql :: strict in postgres SQL 
Sql :: mssql last day of month 
Sql :: grant all priviledges to mysql user 
Sql :: postgres concat_ws 
Sql :: oracle to_number 
Sql :: mysql select column where has non int values 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =