proper type for unix time in mysql database

What is the proper way to store unix time in a mysql database.  I have it as int(10) but I am not sure that is right.  Thanks
LueyAsked:
Who is Participating?
 
Ray PaseurConnect With a Mentor Commented:
I recommend either DATETIME or TIMESTAMP, depending on what you're trying to accomplish.  This article explains some of it.  You might want to read the entire article.  The part you're asking about can be found by searching Storing Date and Time in Your Database
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_201-Handling-date-and-time-in-PHP-and-MySQL.html
0
 
GaryCommented:
int(10) is fine - is there a reason you don't think it is?
0
 
Ray PaseurCommented:
Thanks for the points, and thanks for using EE, ~Ray
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.