-2

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.

1 Answers1

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