hi
i have mysql table (arret) , i want to sum (duree) it's time column (HH:MM:SS)
i tried this
- string query = "SELECT SEC_TO_TIME( SUM( TIME_TO_SEC( `duree` ) ) ) FROM arret ;";
- cmd = new MySql.Data.MySqlClient.MySqlCommand(query, conn);
-
- try
- {
- conn.Open();
-
- int s = cmd.ExecuteNonQuery();
- label1.Text = s.ToString();
-
-
- }
-
- catch (Exception ex)
- {
- MessageBox.Show(this, ex.Message);
-
- }
- conn.Close();
it's giving me (-1)
my table contains 00:09:00
00:12:32