View Full Version : Wrong Time Formats in MySQL database

03-15-2004, 03:19 PM
I'm posting this in this forum and the MySQL forum...

Here is the scenario...

I have a table that has two columns departure, arrive... They are VARCHAR fields and so not stored with any timestamp or anything, just plain old strings.

Anywho... SOME of the values are in AM/PM format... like... 9:30AM or 9:30PM. SOME of the values are in 24-Hour format...

I NEED to get everything into 24-Hour format - and have 11,000 records to process... Don't want to do each one manually <G>.

I need the items that are like 9:30AM to end up as 09:30 and those like 9:30PM to be 21:30..

I'm racking my brain to come up with a PHP script and I think I'm giving up until someone sparks me with a hint. :-)~


03-15-2004, 03:43 PM
Where would you like me to answer your question? --> remove one of your threads, preferably the mySQL one

03-15-2004, 06:37 PM
I was hoping that there was either a mysql answer or a PHP answer or one of each. I like variety.

03-15-2004, 06:44 PM
Since you don't like to abide by our rules and guidelines I am closing this thread.

Don't crosspost!


Closing thread...