On Wednesday, March 30, 2005 10:24, Christopher Vaughan wrote: > Tom Crimmins on Wednesday, March 30, 2005 at 11:10 AM -0500 wrote: >> If you convert it to a time field you can use mysql built-in >> functions to do what you want. You are limited to the range >> -838:59:59 to 838:59:59 though. >> >> http://dev.mysql.com/doc/mysql/en/time.html >> http://dev.mysql.com/doc/mysql/en/date-and-time-functions.html > > I'm not sure that this is going to work. Since the length of the > data ranges from 8-9 characters in length and I also need to sum all > the times on hour, minute and second. I looked at the addtime > function but for the version of MySQL we have installed it does not > work and upgrading it would be an unwanted hassle. > > > -Chris Vaughan > > www.clusters.umaine.edu
Look at the functions HOUR(time), MINUTE(time), SECOND(time). These will give you interger output for each part of the time field. Also TIME_TO_SEC(time) may be useful for you. I believe that all of these are supported in 3.23. If your times aren't greater than 838:59:59 this should work for you. -- Tom Crimmins Interface Specialist Pottawattamie County, Iowa -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]