Re: Modify MySQL time column values
- From: "lorento" <laurente1234@xxxxxxxxx>
- Date: 27 Jun 2006 23:49:41 -0700
I think you should not use time as column type..
better use VARCHAR(5)
--
http://www.deshot.com
Ridge Burner wrote:
Sorry, I know this NG focuses on PHP, and not MySQL, but I cannot find any
English MySQL NG through my ISP, and since most PHP users out there use some
type of database system.......well it's worth a shot!
I created a table with a column type of 'time'. The default format for this
column is => 00:00:00 (HH:MM:SS). The form I made to populate the table has
the time in this format => 00:00 (MM:SS), without the hours explicitly
specified. So when I intended to store something like 3:49 (3 minutes
forty-nine seconds), it actually stores it as 03:49:00 (3 hours forty-nine
minutes)!
I am hoping someone can help me out with whatever SQL I need to convert the
times to the correct format.
Basically, I need to convert '02:35:00' to '00:02:35' in a time column.
Thanks for any help you can give me!
--Ridge
.
- Follow-Ups:
- Re: Modify MySQL time column values
- From: Ridge Burner
- Re: Modify MySQL time column values
- References:
- Modify MySQL time column values
- From: Ridge Burner
- Modify MySQL time column values
- Prev by Date: Re: Help - Outputting Thumbnails
- Next by Date: Why php ?
- Previous by thread: Modify MySQL time column values
- Next by thread: Re: Modify MySQL time column values
- Index(es):