What's the best way to do MySQL dates?

Associate
Joined
16 May 2005
Posts
680
I'm normally really lazy with dates and usually store as a varchar YmdHis

I'm building a sales system at the minute and want to be able to pull out dates between ranges of dates, months etc, and want to store dates most effectively for querying the entries.
 
depends if you want to store the time and date (datetime), or just the date (date). you could also store as a unix timestamp, but I can't really see why you'd want to do that - MySQL datetime is much better (imho)
 
Back
Top Bottom