mardi 26 juillet 2016

Sum SQL timestamp

How can do a sum search by 'id=1' and add up their hours. The first line will be there in time, the next will be their out time.

Below should add up to 5:43:29

id, ts
1,2016-06-20 04:25:32
3,2016-06-20 07:40:09
1,2016-06-20 09:37:46
3,2016-06-20 14:40:57
1,2016-06-20 15:12:14
1,2016-06-20 15:43:29
2,2016-06-20 15:47:01
2,2016-06-20 17:47:03

Aucun commentaire:

Enregistrer un commentaire