Q:

Sort sql output by date what row

What would be the best way to store date and time in sql databases?
Should i use date() or is there some other better way to do it? and if i should be able to sort by the dates, what kind of sql row should it be set to? a timestamp or datetime?

A:

Both, the DATETIME and TIMESTAMP can be sorted in their default formats. Using one of these two is the best way to follow instead of storing them as VARCHAR or other data-types.
I personally prefer using DATETIME over TIMESTAMP because of the limitation applied to it.

