Date different, format

<?php $date_end = date("Y-m-d H:i:s"); $diff = strtotime($date_end) - strtotime($date_start); $seconds = $diff%60; $minutes = floor($diff/60); $hours = floor($minutes/60); $minutes = $minutes%60; echo $hours.':'.$minutes.':'.$seconds;
Date different, output H:m:s

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.