How can I get the difference between two timestamps in days? Should I be using a datetime column for this?
I know is quite old, but I'll say just for the sake of it - I was looking for the same problem and got here, but I needed the difference in days.
I used SELECT (UNIX_TIMESTAMP(DATE1) - UNIX_TIMESTAMP(DATE2))/60/60/24
Unix_timestamp returns the difference in seconds, and then I just divide into minutes(seconds/60), hours(minutes/60), days(hours/24).