4

I'm going to allow user of a website to choose the display format for their dates but not sure of what placeholder/title to display. So for the format "dd/MM/yyyy HH:mm" which placeholder should I use?

  • dd/mm/yyyy hh:mm
  • dd/MM/yyyy HH:mm

I would imagine most people will understand what to enter for the first one whereas only a small percentage will understand the significance of the capitalized letters in the second format. As a developer I personally prefer to see the second format.

2
  • So, should the user just pick one or should they enter something? The need to understand exactly isn't that critical if they're just choosing how dates should be presented.
    – Babossa
    Commented May 20, 2014 at 6:04
  • 1
    The use will pick a format from a predefined list. I might show an example date and time formatted in their current selection so they don't need to understand the exact format.
    – Goose
    Commented May 20, 2014 at 6:10

3 Answers 3

4

An example date would make a huge difference, especially if you update it on-hover on one of the options. I would recommend to use today's date in you dropdown/picker instead of the placeholders. That would provide a more immediate clarity around the formats. The use of today's date instead of an example date should reduce the risk for ambiguity for the susceptible formats.

3
  • 1
    +1 for using the current date instead of a placeholder. Though, what about 1/1/2015 vs 1/1/2015? Commented May 20, 2014 at 7:30
  • I had considered using today's date but though it wouldn't be clear when the day and month are the same such as 05/05/2014. Secondly some fields might be optional (and usually left blank). I will have a look at showing examples of today's date along side the format choice when hovering over them.
    – Goose
    Commented May 20, 2014 at 7:33
  • The the reduced risk of ambiguity I mentioned. The ambiguous dates will be straightened out by the non-ambiguous (e.g. when you see 1/1/2015, you will also see 01/JAN/2015 in the list that will tell what's intended with the first format), plus, people should be able to recognise the date as that of Today. The problem both of you mentions is due for whatever you would pick as example date.
    – Babossa
    Commented May 20, 2014 at 8:33
2

I'd say it depends on how many features you want to support. If you want to make a distinction between the following:

dd/M/yyyy     for 01/1/2001
dd/MM/yyyy    for 01/01/2001
dd/MMM/yyyy   for 01/JAN/2001
dd/MMMM/yyyy  for 01/January/2001

... etc... then this is quite advanced and won't be intuitive for the users. You will have to provide a guide. Even the modern computing platforms .NET and Java don't have identical formatting conventions, and database vendors tend to have even more options. You can consult the documentation for .NET custom date and time formatting, and Java pattern strings to get a feel for this.

If your requirements are more simple and maybe you are just looking to let the user choose the order of a limited set of fixed items, and perhaps the date separator, you could simplify your notation. For instance, you could consider:

D/M/Y h:m:s

-or-

Y-M-D h:m:s
3
  • I would expect MMM to output JAN (because of the three-letter correlation) and to choose MMMM for January. Certainly the proposed difference between mm and MM would be lost on me -- and I use databases in the day job. Commented May 20, 2014 at 6:42
  • @AndrewLeach I'll update the answer based on your feedback.
    – Mishax
    Commented May 20, 2014 at 7:39
  • I will only have two or three choices but I do plan to allow leading zeros to be omitted so D/M/Y h:m:s would work nicely. It shows order without inferring an exact format. Ultimately I will however have a d/t picker but want to make it as accessible as possible.
    – Goose
    Commented May 20, 2014 at 7:40
2

I would caution allowing too much variation here. If you prefer the Month label to be a number or a word, I'd suggest making that decision up front and then allowing users to possibly determine the order. Especially since the US and European countries display dates slightly differently.

As far as your question is concerned, I would suggest displaying the two options with today's date as an example.

Instead dd/mm/yyyy hh:mm display 20/05/2014 16:05 or 20 May 2014 16:05 (depending on the format you go with).

1
  • I definitely only allowing numeric input and only allow the order changed for the date and 12/24 hour format for the time. This will make it easier for input and for parsing. Ultimately all the answers have given me good ideas, shame I can only pick one as accepted.
    – Goose
    Commented May 20, 2014 at 16:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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