Hey everyone, I am writing an application to keep track of employee vacation leave. I have two timestamp(14) database fields, lets call them start and end, signifying when start and end of a vacation leave, respectively. What I am trying to do is get the number of hours between start and end, for example if vacation started at 12pm on wednesday and ended at 5 pm wednesday, then the total should be 5 hours (Of course the date ranges are going to be alot more complicated than that). I attempted to solve this problem in the query, using the following:
FLOOR((end-start)/3600) as hours but the values that I am getting are wrong. For example, on what should be a 5 hour span, I am getting back the value 13. Any ideas? Christian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php