On Tue, May 11, 2004 at 07:13:29PM -0600, QuickBrownFox wrote: > Okay. I think I can handle that. The only thing is this: I'm > inserting this data into a MySQL database, so, I'll have to change it to > 24 hour format anyway. I'll have to decide which I want to do.
Regardless of what you're doing with it, you're better off converting it to a format you can manipulate at will. Epoch seconds is usually the best, but 24 hour format isn't far behind. > returned. I'm doing this in PHP, and sometimes it seems a bit quirky in > its backreference ordering, especially with nested parentheses. I > suppose I could deliberately make them non-capturing parentheses like this: Don't reinvent the wheel: http://us2.php.net/manual/en/function.strtotime.php <?php echo strtotime("2004-05-11"), "<br />\n"; echo strtotime("11:13:03 am"), "<br />\n"; echo strtotime("11:13:03 pm"), "<br />\n"; ?> Of course you'll have to handle bad data, but there are some examples on the page. Alan ____________________ BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
