Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

how to use timestampdiff in a table in sql

SELECT 
    TIMESTAMPDIFF(MONTH, '2010-01-01', '2010-06-01') result;

+--------+
| result |
+--------+
|      5 |
+--------+
1 row in set (0.00 sec)
Code language: SQL (Structured Query Language) (sql)
Source by www.mysqltutorial.org #
 
PREVIOUS NEXT
Tagged: #timestampdiff #table #sql
ADD COMMENT
Topic
Name
7+3 =