I want to extract minutes from difference of two dates, but the dates are saved in two columns, say C1 and C2. I used this command "SELECT TIMESTAMPDIFF(minutes, C1,C2) FROM Table ;" Its not correct, of course, because it is giving syntax error. Also I want to extract minutes from difference of date in a colunm and current date.
Asked
Active
Viewed 35 times
-2
-
*and I want to flag this question as opinion based :P* – Pathik Vejani Jan 26 '16 at 06:38
-
Why ? I searched for on stack also. But the syntax is still showing error. – Adesh Tamrakar Jan 26 '16 at 06:55
-
do you want that we do your homework? *Also I want to extract minutes from difference of date in a colunm and current date.* – Pathik Vejani Jan 26 '16 at 06:58
-
for more info refer this: http://www.w3resource.com/mysql/date-and-time-functions/mysql-timestampdiff-function.php – Pathik Vejani Jan 26 '16 at 07:00
1 Answers
0
You can search it on stack overflow.
somebody already faced same issue and resolved here
example for second or you can use minute (MINUTE): SELECT TIMESTAMPDIFF(SECOND, date_column_1, date_column_2) from table_name

Community
- 1
- 1

Harish Rawat
- 99
- 8