Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql timediff

SET @date1 = '2010-10-11 00:00:00', @date2 = '2010-10-10 00:00:00';
SELECT 
  TIMEDIFF(@date1, @date2) AS 'TIMEDIFF',
  TIMESTAMPDIFF(hour, @date1, @date2) AS 'TIMESTAMPDIFF';
Comment

PREVIOUS NEXT
Code Example
Sql :: savepoint in sql 
Sql :: select nextval from sequence oracle 
Sql :: oracle create table if not exists 
Sql :: how to login sql server using cmd 
Sql :: Get monday of week date is in SQL 
Sql :: phpmyadmin password root 
Sql :: mysqldump --skip-lock-tables 
Sql :: t-sql delete view if exists 
Sql :: get record which is available in one table but not in another mysql 
Sql :: select first and last row sql 
Sql :: show the colums of table sql 
Sql :: how to show index type in postgresql 
Sql :: how to make a select in sql 
Sql :: replace null in sql 
Sql :: SELECT exists sql 
Sql :: sql concat 
Sql :: oracle revoke 
Sql :: foreign key constraint in ms sql 
Sql :: sql check duplicate value in column 
Sql :: install mysql on ubuntu 
Sql :: SQL Error 1040 : Too many connections 
Sql :: sql datetime format 
Sql :: how to find third highest salary in sql 
Sql :: mysql decimal allow negative values? 
Sql :: update con select postgresql 
Sql :: activate event scheduler mariadb 
Sql :: mysql delete entire row on condition 
Sql :: host 127.0 0.1 is not allowed to connect to this mysql server 
Sql :: mysql date equals to current_date plus days 
Sql :: mysql order by 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =