Time Processing (sum of two times)

From: Date: Fri, 12 Oct 2001 18:39:12 +0000
Subject: Time Processing (sum of two times)
Groups: php.general 
Request: Send a blank email to php-general+get-70947@lists.php.net to get a copy of this message
Hi, Does anybody know of a way in PHP to get the sum of two times? For example, you have extracted "11:05:00" from one field of a database, and "00:56:00" from another field. I need to add the two and come up with something like: "11:05:00" + "00:56:00" = "12:01:00" In other words, the sum of two times (as in a time field). It could be used, for instance, when you're trying to add an appointment time and the length of the appointment to get the end of that appointment time, or the start of the next appointment time. Some scripting languages have functions like SumTimes(time1, time2) OR SumDates(date1, date2) OR DiffTimes(time1, time2) Any ideas how to accomplish this in PHP please? Thanks.

« previous php.general (#70947) next »