Date comparison : which date format?

The date format for entering the date is largely irrelevant. strtotime will convert a lot of different formats to UNIX time. Just make sure your input format makes sense to your users and make sure that your feed strtottime a format that correctly converts to UNIX time. If you are storing data in the *_postmeta table, that is what I’d most likely do since ordinary math works on UNIX time so numeric comparisons work and because most of PHP’s builtin date/time functions would require you to convert to UNIX time anyway. Even the MySQL database can work date logic using FROM_UNIXTIME.

That isn’t the only option. If you have your own table you could store in one of MySQL date/time formats and the database can work some date logic for you.

If you don’t need any complex date logic you can store as YYYYMMDD and the date will sort correctly using ordinary math. That is is the only human date format that does sort correctly using ordinary math. It doesn’t work well if you want to pick “all dates in May of any year” or all “January 1st events”– that sort of thing.

deneme bonusu veren sitelerbahis casinomakrobetceltabetpinbahispolobetpolobet girişpinbahis girişmakrobet girişpulibet girişmobilbahis girişkolaybet giriş