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
cAEZAr
Forum Newbie
Posts: 2 Joined: Fri Feb 18, 2005 9:23 pm
Location: Philippines
Post
by cAEZAr » Fri Feb 18, 2005 10:17 pm
i would like to ask a code on how to get the time difference between time1 and time2..
eg.
time1 = 3:40 PM
time2 = 7:22 PM
===========
ttime = ?:?? PM
i am using a 12Hour format...
help me on how to get this..
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Fri Feb 18, 2005 10:22 pm
convert the time values to seconds. strtotime() may help with this.
cAEZAr
Forum Newbie
Posts: 2 Joined: Fri Feb 18, 2005 9:23 pm
Location: Philippines
Post
by cAEZAr » Fri Feb 18, 2005 10:29 pm
i forgot that function..
yes its useful,
by the way is there any other way?
anjanesh
DevNet Resident
Posts: 1679 Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India
Post
by anjanesh » Fri Feb 18, 2005 10:52 pm