[PHP] Converting a "timestamp"
I have a "timestamp" written to a text field in MySQL that I need to convert in every record. Currently it is formatted like 2017|02|16|04|58|42
and I want to convert it to this format 2017-02-16 @ 04:58:42
What’s the best way to do this? Do I need to read each record, convert it in PHP, and then insert it back into the table? Or is there a shorter way of doing this that doesn’t require both reading and writing each record?
Also, if it’s easier, is there a way to do this directly in MySQL?
I’m not really asking for code at this point, as I’m just trying to figure out how to get started.
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php