Unix timestamp not playing well with others
View Single Post
04-22-2008, 08:35 PM
Join Date: Apr 2007
column can contain a maximum value of
. The number in parentheses is only for the display width of the column and has no effect on the range of values that can be stored in it. Since timestamps are integers like
they are way, way out of the accepted range of values (
unsigned) and therefore they get truncated to 255.
You should use an appropriate column type (either
) to store the timestamps and use the available MySQL functions (
) to convert between the integer Unix Timestamp and other representations.
The Following User Says Thank You to Salathe For This Useful Post:
View Public Profile
Send a private message to Salathe
Visit Salathe's homepage!
Find More Posts by Salathe