...

View Full Version : Wrong Time Formats in MySQL database



rswyatt
03-15-2004, 02: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. :-)~

Thanks,
~Rich

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

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

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

Don't crosspost!

http://www.codingforums.com/showthread.php?s=&threadid=35090

Closing thread...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum