RE: Time Field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Best to use int field type and store the difference between the unix timestamp start time and the unix timestamp end time (both seconds since the epoch) which would be the number of seconds it took to complete the task. This number can then be manipulated with math to provide elapsed times in hours/minutes//seconds...

hth

Bastien


From: "Bomgardner, Mark A" <mbomgardner@xxxxxxxxx>
To: <php-db@xxxxxxxxxxxxx>
Subject:  Time Field
Date: Thu, 28 Oct 2004 10:10:19 -0500

When creating a time field in MySQL, its purpose is for elapsed time,
not time of day.  Is it better to use this field or to combine it with
the date field when looking at inserting the start date and time of an
event?



Mark A. Bomgardner
Technology Specialist
KLETC




-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux