Convert UNIX timestamp to MySQL date format YYYY-MM-DD 00:00:00?
Posted on 2008-10-03
I have a piece of software which takes SMS's from a mobile phone and puts that message straight in to a MySQL database table. The software creates the timestamp of the SMS in UNIX format, 10 digits. I need this information to be presented in MySQL format: YYYY-MM-DD 00:00:00.
I have looked at many sites stating how this can be done but as yet I'm unable to get it working.
My table is called SMSIN and the fields I need are timestmp , message and number.
Even if I have to run a script that copies these values in to another table for me to use that would be fine, if not can another field in the same table have the real date in it?
Any help would be much appreciated.