Why in Windows 7 do I see the Data & Time in DateTimePicker inverse and in Windows XP it is fine? (the region and language are the same)

For example:

Win7:  2010/12/31  -  51:09

XP  :  31/12/2010  -  09:51

migrated from stackoverflow.com Apr 18 '10 at 6:04

This question came from our site for professional and enthusiast programmers.

  • Hello. You've been a member of StackOverflow for a year and have a high reputation score, so you're not exactly new here. What makes you think this is a programming related question? – Tamas Czinege Apr 16 '10 at 8:54
  • DataTimePicker, I guess. – mafu Apr 16 '10 at 8:56
  • Because Win7 has given you a sensible date format? (Unfortunately it has failed on the time :-(.) YYYY-MM-DD is the international standard format, and sorts textually with string comparisons. – Richard Apr 16 '10 at 9:55
  • I totally prefer the Y-M-D format, sure. I have no idea why time is reversed, are you saying it's the default? Makes no sense to me... – mafu Apr 16 '10 at 10:07
  • @Gold: You could probably avoid any confusion about this being programming related if you included the line of code that produces those results. – Bill the Lizard Apr 17 '10 at 1:59

You likely messed with the custom region settings. For instance, setting mm:hh instead of hh:mm for time display. The custom settings override the default regional settings.

The settings are used system-wide - in DataTime picker controls as well. If you want to use a certain, fixed format, you can simply set it on the picker.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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