How to find difference of two dates

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
eshban
Forum Contributor
Posts: 184
Joined: Mon Sep 05, 2005 1:38 am

How to find difference of two dates

Post by eshban »

Im wondering what code would be needed to work out the time difference between two times shown on a 24 hour clock such as 15:30:30 and 16:45:30 this would be 01:15:00 time difference. Is there anyway for php to show the time difference between two recorded times but also show a message if the times arent found?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Take a look at printf's (that's the username) code snippet in Code Snippets.
Post Reply