Warning: Invalid argument supplied for foreach() in /home/techrecipes/public_html/wp-content/themes/techrecipes/header.php on line 77

Customizing Date and Time in Windows 7 and Vista

Manipulating how the time and date is displayed within Windows is one of the first things that users tweak after installing the OS. This article describes in detail how to adjust the time and date format in Vista and Windows 7. This includes changing to 24-hr military time and displaying leading zeros.

Please note that the System Tray clock is displayed as Long Time and the date is displayed as Short Date.

Open the Control Panel and click Clock, Language, and Region.

Clock, Language and Region

Click Region and Language.

Region and Language

Here, you can choose from a set of predefined time and date formats. See below for more about what the “M, dd, etc.” mean. If the presets aren’t quite up to par with the format you’re looking for, click Additional Settings.

Date and Time Presets

Click the Time tab at the top. You can now type in a format to your suiting in the Time Formats boxes.

Insert Custom Time Format

Click the Date tab at the top. You can type in a format to your suiting in the Date formats boxes.

Insert Custom Date Format

Make sure to click OK once you’ve changed all of your settings.

Date Formats:

  • M: A capital M denotes the month, without leading 0′s.
  • MM: Two capital M’s denotes the month, with leading 0′s.
  • MMM: Three capital M’s denotes the month, in text form to be displayed as the short date. (i.e. May instead of 5 or 05)
  • MMMM: Four capital M’s denotes the month, in text form to be displayed as the long date.
  • d: A lowercase d denotes the day of the month, without leading 0′s.
  • dd: Two lowercase d’s denotes the day of the month, with leading 0′s.
  • dddd: Four lowercase d’s denotes the day of the month, in text form to be displayed as the long date. (i.e. Tuesday)
  • yy: Two lowercase y’s denotes the year, only displaying the last two digits of the year, with leading 0′s. (i.e. 2001 would be 01; 2012 would be 12)
  • yyyy: Four lowercase y’s denotes the year, using all four digits of the year. (i.e. 2012)


Time Formats:

  • H: A capital H denotes the hour of the day, in 24-hour time, without leading 0′s.
  • HH: Two capital H’s denotes the hour of the day, in 24-hour time, with leading 0′s. (i.e. 9:00 am would be 09:00, or “O 900 hours”)
  • h: A lowercase h denotes the hour of the day, in 12-hour time, without leading 0′s.
  • hh: Two lowercase h’s denotes the hour of the day, in 12-hour time, with leading 0′s.
  • mm: Two lowercase m’s denotes the minute of the hour, with leading 0′s. Minutes cannot be formatted to not have leading 0′s.
  • ss: Two lowercase s’s denotes the second of the minute, with leading 0′s. Seconds cannot be formatted to not have leading 0′s.
  • tt: Two lowercase t’s denotes the AM/PM marker. tt will display AM/PM respectively.


Example: Military Time With Leading Zeroes

If I wanted my clock to be displayed as 24-hour military time WITH leading zeroes, the minutes, the seconds AND the meridian marker, here is the format I would use:

HH:mm:ss tt

 

About Aaron St. Clair

Aaron St. Clair is a tech guru studying Computer Science at Appalachian State University in Boone, North Carolina. When he's not tinkering with new gadgets, modding systems, or slaving away at the mercy of the Tech-Recipe overlords, you can find him exploring the high country.
View more articles by Aaron St. Clair

The Conversation

Follow the reactions below and share your own thoughts.

  • David

    In XP I was able to change the time separator from : (colon) to * (asterisk) to make entry of time data easier in Excel.
    Windows 7 tells me that “One or more of the characters you entered ….”.
    What is the work around to deal with this bug?
    Thanks

    • Aaron St. Clair

      I can’t find a work around for this… You can make the separator be a “.” (period), but W7 doesn’t seem to allow an * for time separation. How does making the separator be an * ease excel input? It may be a problem that can be adjusted for within excel, versus changing it in W7. I’m pretty good with Excel, so more info on how you’re using the * in it will help aid in finding a fix.

      • John30303

        > The “*” is located on the number pad and only requires one keystroke to use. The “.” is makes it too easily to confuse decimal time (tenths of an hour) with “minutes” time.

  • cnashford2

    Thanks! Now I can look at 12/12/12 all day long!

  • Greg

    In the US Military, the date is ddMMMyy where MMM is JAN or MAR. Windows however makes MMM Jan or Mar. Is there a way to change the month to all capital letters?

    • http://www.tech-recipes.com/ Aaron St. Clair

      Not that I am aware of. That would involve modifying a system file somewhere that interprets the system time format.