RE: [PHP-DB] Time Field
| From: | Bastien Koert | Date: | Thu, 28 Oct 2004 15:17:30 +0000 |
| Subject: | RE: [PHP-DB] Time Field | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-37072@lists.php.net to get a copy of this message | ||
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@kletc.org> To: <php-db@lists.php.net> Subject: [PHP-DB] 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