Custom Date Format in MS Word 2010

8

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?

English Time/Date Settings

Felix Dombek

Posted 2011-09-01T14:20:22.710

Reputation: 1 729

What is your operating system? – wizlog – 2011-09-01T15:01:08.757

+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). – Randolf Richardson – 2011-09-01T15:48:24.147

@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. – Felix Dombek – 2011-09-01T18:12:31.877

Answers

0

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.

wizlog

Posted 2011-09-01T14:20:22.710

Reputation: 12 320

There is no Regional and Language Options! Downvote – Green – 2016-06-24T05:01:29.590

1This is a valid answer that resolves this issue for many programs (+1). Please don't delete it. – Randolf Richardson – 2011-09-01T15:44:03.533

@randolf sorry, I had included something for 1995-97 version. I clicked delete, then undelete, then added this. I won't. – wizlog – 2011-09-01T16:04:49.730

1Thanks 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! =) – Randolf Richardson – 2011-09-01T16:09:21.140

3-1 This is absolutely NOT helpful for my specific problem! – Felix Dombek – 2011-09-01T17:24:05.043

Try it. It is. After you add the customized date format, re-open MS word 2010 and you'll see. – wizlog – 2011-09-01T19:24:24.430

@wizlog: OK, if you say that, I'll try again tomorrow. I actually opened the dialog you mention but had the impression that it just lets me specify ONE way of formatting numbers, not change or expand MS Word's format list. I'm probably mistaken if you are so sure of this. I'll get back to you and change the downvote into an upvote if it works. – Felix Dombek – 2011-09-02T00:54:54.363

@wizlog: I tested it again and it worked -- kind of. It introduced some \\ symbols in Word at first but worked at the second try. Thanks. Please make a little edit to your answer so I can change my vote (otherwise the site wouldn't let me). – Felix Dombek – 2011-09-12T16:45:13.013

@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 – 2011-09-12T17:28:20.320

@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. – Felix Dombek – 2011-09-14T00:04:52.897

l33me look into it... – wizlog – 2011-09-14T00:06:36.697

6

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

zeocrash

Posted 2011-09-01T14:20:22.710

Reputation: 197

So what? It doesn't make it – Green – 2016-06-24T04:56:25.033

1This totally works! It is the most versatile, works in the normal UI with no XML tweaks. Should definitely be the right answer. – glopes – 2017-09-20T21:12:12.243

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 to yyyy and change the 11 to 2011.
  • Save the file, zip everything up again and rename the archive to .docx. Done.

Felix Dombek

Posted 2011-09-01T14:20:22.710

Reputation: 1 729

Wow, 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. – David Clarke – 2015-11-03T00:37:14.633

As 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 – Don Vince – 2012-09-15T10:55:56.170

2

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.

Leniel Maccaferri

Posted 2011-09-01T14:20:22.710

Reputation: 771