I have a MySQL database and it has one table with a date field and the format is as below '1212246855000'. How could I convert it to a valid mm/dd/yyyy hh:mi:ss format?
That format is 'epoch seconds' (have a Google for it)
It is a very useful format especially if passing data accross different languages. If you are using PHP there will be decoding routines already written for it. Not too sure on that as I use other languages for the same purpose.
Can you do a controled insert into the table e.g. run the app and note the time and then go and have a look what the column says.
do you access to the source code ?.
audiopro is corret, mysql has some function to convert date and times. Have you looked into these at
I will stick by my original post of it being an epoch date. The difference is that in this form it is the number of milliseconds since 1970-01-01. I vaguely remember learning this many years ago bit I cannot remember why such accuracy was required. Remove the last three digits (convert to seconds) and you get a valid date.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.