Hi all,
When adding in new posts into a mysql table i would like to later on be able to search on posts that was added in the last year or month. Can someone advise the best way to store the dates in mysql? field type and date format? If i use date field instead of varchar the dates are in US format and i want them in UK format. also i am not sure if we can search on them if they are in the format of 14/05/2010.
Hope someone can advise me on best practice.
Help - Search mySQL post on a date field
Moderator: General Moderators
Re: Help - Search mySQL post on a date field
I will use DATE as the field type if the time is not relevant, DATETIME otherwise, and use date_format() to manipulate the date format in the way I want.