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
shiznatix
DevNet Master
Posts: 2745 Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:
Post
by shiznatix » Mon Jan 29, 2007 9:27 am
Please dont kill me as I couldnt find the answer in searching.
I have 2 strings, say "3:00 AM" and "4:30 PM"
I need to be able to be like: "time worked was 13.5 hours"
is there an easy way to get that 13.5?
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Mon Jan 29, 2007 9:30 am
strtotime() may be able to help, but you may end up having to parse or translate the text first (or alternately.)
shiznatix
DevNet Master
Posts: 2745 Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:
Post
by shiznatix » Mon Jan 29, 2007 10:02 am
i feared that would be the case. oh well best start now