when they say "we will use unix time", does that mean i should create a column like this ?
date DATE
or
date TIME
or
date DATETIME
?
when they say "we will use unix time", does that mean i should create a column like this ?
date DATE
or
date TIME
or
date DATETIME
?
UNIX time is expressed as an integer value - number of seconds since the epoch. You'd just want to use an int field for this, not any of the date variants.
A unix time is just a number representing the nr of seconds since 1970. If you want to store that directly, use an INTEGER.
You're likely better off storing this as a DATETIME, as that will facilitate easier querying. Though when inserting data you might need to convert it using the from_unixtime function.
A DATE stores only the date, not the time(hour/min/secs) and a TIME stores only the time not the date so they're not suitable.