0

How can I substract two times in php please ?

How can I subtract two times in php please ? like 21:15:36 - 12:01;59

26th Jul 2021, 8:33 AM
Ramzi Jebalia
Ramzi Jebalia - avatar
3 odpowiedzi
0
Yes and here is the code from the community https://code.sololearn.com/w6XU2gtDN6y0/?ref=app
26th Jul 2021, 8:46 AM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
0
@akshayin it does not work , really i don't understand why .. in my SQL table i have start time , end time and differnce between them should be calculated and saved in the same SQL table , i htis case he just subtract hours ecample : 12:25:15 - 10:25:01 = 02:00:00
26th Jul 2021, 8:59 AM
Ramzi Jebalia
Ramzi Jebalia - avatar
0
Depending on what difference you want, I think you might want to lookup for either DATEDIFF, TIMEDIFF or TIMESTAMPDIFF in SQL reference.
26th Jul 2021, 10:00 AM
Ipang