[PHP] Re: Math problems (No not high school math!)

2008-09-25 Thread Nathan Rixham
Jason Pruim wrote: So I'm trying to figure out how to do a little math in php to add up the number of hours that people have worked (Still on the timecard for anyone following along at home) I have it inserting time in and timeout as timestamps into a MySQL database, from there, I use a

Re: [PHP] Re: Math problems (No not high school math!)

2008-09-25 Thread Jason Pruim
On Sep 25, 2008, at 11:19 AM, Nathan Rixham wrote: Jason Pruim wrote: So I'm trying to figure out how to do a little math in php to add up the number of hours that people have worked (Still on the timecard for anyone following along at home) I have it inserting time in and timeout as

Re: [PHP] Re: Math problems (No not high school math!)

2008-09-25 Thread Jason Pruim
On Sep 25, 2008, at 11:24 AM, Jason Pruim wrote: On Sep 25, 2008, at 11:19 AM, Nathan Rixham wrote: Jason Pruim wrote: So I'm trying to figure out how to do a little math in php to add up the number of hours that people have worked (Still on the timecard for anyone following along at

[PHP] Re: Math problems (No not high school math!)

2008-09-25 Thread Maciek Sokolewicz
Jason Pruim wrote: So I'm trying to figure out how to do a little math in php to add up the number of hours that people have worked (Still on the timecard for anyone following along at home) I have it inserting time in and timeout as timestamps into a MySQL database, from there, I use a

[PHP] Re: Math problems (No not high school math!)

2008-09-25 Thread Lupus Michaelis
Jason Pruim a écrit : $totalday = $totalday/60/60; If you're working with legal dates, this is wrong. A day can be 23 or 25 hours long. Thing about time changing (winter and summer time). Use strtotime to avoid this kind of problems. -- Mickaël Wolff aka Lupus Michaelis