Custom Date Format in MS Word 2010
Solution 1
Change the display of dates, times, currency, and measurements
This is also the method to changing the format Windows uses to display dates, times, currency, and measurements. You can also change the sorting order of text to match sorting rules used in a specific country or region.
Open Regional and Language Options by clicking the Start button , clicking Control Panel, clicking Clock, Language, and Region, and then clicking Regional and Language Options.
Click the Formats tab, click Customize this format, and then, click on date.
Solution 2
I believe the way to do this is the following:
- Go to the Insert tab in Word
- Quick parts
- Field
- Select Date from the list on the left.
- Enter your custom date format in the text box on the right (eg.
MM-DD-YY
) - Click OK
Solution 3
Well... I did the following:
Right clicked the Date field and selected Toggle Field Codes
.
It was like this:
{ TIME \@ "MMMM d, y" }
the single y
was giving me a two digits year like 14
.
I changed it to
{ TIME \@ "MMMM d, yyyy" }
Right clicked the Date field again and selected Toggle Field Codes
.
Voila. It worked!
Now I get a four digits year: 2014
.
Solution 4
In the absence of answers suggesting simpler or more general solutions for adding custom date formats, here's what I did to solve the problem:
- Rename the
.docx
file to.zip
and unzip the contents to a folder. - Open the file
word\document.xml
in a text editor. - Search for
dateformat
(case-insensitively). There are two hits, something like
<w:dateFormat w:val="yy"/><w:lid w:val="de-DE"/><w:storeMappedDataAs w:val="dateTime"/><w:calendar w:val="gregorian"/></w:date></w:sdtPr><w:sdtContent><w:p w:rsidR="00331636" w:rsidRDefault="00331636"><w:pPr><w:jc w:val="right"/><w:rPr><w:sz w:val="96"/><w:szCs w:val="96"/><w14:numForm w14:val="oldStyle"/></w:rPr></w:pPr><w:r><w:rPr><w:sz w:val="96"/><w:szCs w:val="96"/><w14:textOutline w14:w="9525" w14:cap="rnd" w14:cmpd="sng" w14:algn="ctr"><w14:solidFill><w14:srgbClr w14:val="000000"/></w14:solidFill><w14:prstDash w14:val="solid"/><w14:bevel/></w14:textOutline><w14:numForm w14:val="oldStyle"/></w:rPr><w:t>11</w:t></w:r></w:p></w:sdtContent></w:sdt></w:txbxContent>
- For both hits, change the highlighted
yy
toyyyy
and change the11
to2011
. - Save the file, zip everything up again and rename the archive to
.docx
. Done.
Related videos on Youtube
Felix Dombek
Computational Linguistics B.Sc. from University of Potsdam, Germany. 7 years of experience developing Windows software for a backup/office software company (languages: classic and modern C++, VB6, Python, PHP) 4 years at TomTom, developing embedded routing software on Linux in modern C++.
Updated on September 18, 2022Comments
-
Felix Dombek over 1 year
I have a date field in a Word document which was created from a template included with Microsoft Word 2010. The default setting for this field is to display only two places of the current year.
I would like to change it to display the complete year number. I found the "Date and Time" dialog as shown, but it doesn't include this formatting option (strangely, it neither includes the two-place year option).
How can I add a custom date format for this text field?
-
wizlog over 12 yearsWhat is your operating system?
-
Randolf Richardson over 12 years+1 for trying to use a 4-digit year (everyone should be striving for this because 2-digit years can be particularly confusing now during the last 12 years). My favourite short date format is YYYY-Mmm-DD which, for today, shows as 2011-Sep-01, because there is absolutely no mistaking what each element means (although it is English-specific, so my second choice would be to use largest-to-smallest ordering {as is also done with time} in the numeric form of YYYY-MM-DD: 2011-09-01).
-
Felix Dombek over 12 years@wizlog: I'm on Windows Vista, but that has nothing to do with the Word-internal list of date formats. The mentioned "default setting" for the text field is specified in the template. I guess the easiest way to change the format is to unzip the docx file, find the XML source code specifying the textbox properties, editing those and zipping everything up again. Let's see.
-
-
Randolf Richardson over 12 yearsThis is a valid answer that resolves this issue for many programs (+1). Please don't delete it.
-
wizlog over 12 years@randolf sorry, I had included something for 1995-97 version. I clicked delete, then undelete, then added this. I won't.
-
Randolf Richardson over 12 yearsThanks for leaving it on -- you obviously put effort into posting a helpful answer, and I just didn't want to see your hard work wasted. Keep up the great work! =)
-
Felix Dombek over 12 years-1 This is absolutely NOT helpful for my specific problem!
-
wizlog over 12 yearsTry it. It is. After you add the customized date format, re-open MS word 2010 and you'll see.
-
Felix Dombek over 12 years@wizlog: It doesn't get saved :( even if I save the file, after a restart the number is 11 again ... I can then still change it to 2011, hit save, but that only works during one session, on the next it's gone again.
-
Felix Dombek over 12 years@wizlog: It also has the additional drawback that while the "short date format" is set to "2011", the display of the date in the taskbar tray changes, and when I have it not set to "2011", this option immediately disappears from the list and also from the list in Word.
-
wizlog over 12 yearsl33me look into it...
-
mark over 11 yearsAs per the accepted answer, my settings were already set as per my needs. This worked perfectly for me; I'm sure there must be a way to edit the format via the GUI, but a quick tweak of the XML did the trick! Thank you
-
David Clarke over 8 yearsWow, that is nuts. Having to edit the xml to set the format of a document property is a little extreme but thank you - I searched high and low for this information thinking there would be a baked in option that I was missing. Note in my case I have a SharePoint 2010 document template that has document properties, not fields. Toggling field codes has no effect on document property display.
-
Green almost 8 yearsSo what? It doesn't make it
-
Green almost 8 yearsThere is no
Regional and Language Options
! Downvote -
glopes over 6 yearsThis totally works! It is the most versatile, works in the normal UI with no XML tweaks. Should definitely be the right answer.