I'm creating a form with both date and time fields. To help the user I'm using a placeholder value to demonstrate how the the respective formats should look like, but I'm not at all sure on what formats to settle.

What date and time format do most people in both continents compound understand/renders less validation errors?

For time I need Hours and Minutes. For date I need Year, Month, Day.


2 Answers 2


This is a great question. Localization is the best answer, but it's useful to know what is used by whom:


Super informative! Roughly 65% of the planet uses DMY, 30% uses YMD, and the rest are slightly bonkers. Personally, I find YMD the most intelligent. It sorts correctly, and is cognitively efficient. ('Y-m-d' is also MySQL's default DATE format).


You should do it in a Locale-dependent way. This can be archived either by asking a user directly (some settings in user profile) or in an authomated way:

  • You may try to recongnize user's country and locale by IP range
  • User-selected language may give you a hint
  • Timezone may also be taken into account (you can get one via JS), but it's quite insufficient as a sole criteria

Having locale information you may render date and time templates properly for each user.

Not the answer you're looking for? Browse other questions tagged or ask your own question.