h1

Word: Replace short date formats with months

February 5, 2014

Short date formats are the bane of the devil, in my opinion! If your audience is global, then does ‘3/4/2014’ mean 3 April 2014 or 4 March 2014?

Actually, both are correct — it all depends on where your audience is located and where it was educated. And I’m only talking about English-speaking audiences here — no doubt short date formats are just as problematic in other languages.

In the example above, Australians and others would read that date as 3 April, whereas those in the US would read it as 4 March. No big deal, you might think? Well, it IS a big deal. In terms of legal documents, development contracts, etc. it could be a HUGE deal.

If you’re writing for an audience that spans multiple locations, then the safest thing to do is to write out dates in such a way that they can be immediately and correctly interpreted, no matter who is reading them. And to do that you need to write out months either in their short or long form so that it’s absolutely clear which date you mean. While you could use the ISO format for dates, the reality is that these aren’t easily readable, so if you go the more informal route, then take the burden off your readers by being clear as to what the date is and not leave it to their (possibly incorrect) interpretation.

If you’re editing a Word document peppered with short date formats, you need an efficient way to change them to a longer format. The steps below show how to use Word’s find/replace wildcard function to change a numerical month surrounded by slashes to a written format separated by spaces.

If you want to do this for ALL months, you’ll have to run this find/replace 12 times — one for each month, making sure you change the position three value in the Find field, and the name of the corresponding month in the replace field. I haven’t figured out to change all date formats written like this for all months at once… if anyone knows how to do that (perhaps using a macro?), please share in the comments below. While the method I describe below is better than doing it manually, it’s still fairly tedious to do all months one at a time.

Change dd/mm/yyyy to dd MMM YYYY

In this first example, I’ll use the Australian short date format of dd/mm/yyyy and change the ‘/6/’ (representing June) to ‘Jun’, and will also add a non-breaking space between the day and the month:

  1. Press Ctrl+H to open the Find and Replace dialog box.
  2. Click More to show the check boxes.
  3. Select the Use wildcards check box.
  4. In the Find What field, type this (NO spaces): ([0-9])(/)(6)(/)([0-9])
    (In this string, you’re finding a single numeral from 0-9 [position 1], followed by a slash [position 2], followed by a 6 [position three], followed by another slash [position 4], followed by another single number from 0-9 [position 5].)
  5. In the Replace with field, type this (NOTE: There’s a single space after ‘Jun’): \1^sJun \5
    (In this string, you’re replacing position 1 with itself [i.e. no change], adding a non-breaking space [^s], followed by the short form of the month’s name, followed by a space, then followed by whatever was at position 5 in the find string [i.e. no change].)
  6. Click Find Next — if you’re satisfied that the correct information will be changed, click Replace. If you’re confident that the only instances of ‘/6/’ in your document are months, then click Replace All.

find_replace_months01

Change mm/dd/yyyy to MMM dd, YYYY

In this next example, I’ll use the US short date format of mm/dd/yyyy and change the ‘6/’ (representing June) to ‘Jun’, add a non-breaking space between it and the day, and add a comma after the day, then a space before the year:

  1. Press Ctrl+H to open the Find and Replace dialog box.
  2. Click More to show the check boxes.
  3. Select the Use wildcards check box.
  4. In the Find What field, type this (NO spaces): (6)(/)([0-9{1,2}])(/)([0-9])
    (In this string, you’re finding a 6 [position 1], followed by a slash [position 2], followed by one or two numbers from 0-9 [position three], followed by another slash [position 4], followed by another single number from 0-9 [position 5].)
  5. In the Replace with field, type this (NOTE: There’s a single space after the comma): Jun^s\3, \5
    (In this string, you’re replacing position 1 with the letters of the short form of the month, adding a non-breaking space [^s], followed by one or two numbers of the day [position 3; i.e. no change], followed by a comma, then a space, then whatever was at position 5 in the find string [i.e. no change].)
  6. Click Find Next — if you’re satisfied that the correct information will be changed, click Replace. If you’re confident that the only instances of ‘6/’ in your document are months, then click Replace All.

find_replace_months02

See also: https://cybertext.wordpress.com/2010/07/29/dating/

 

[Links last checked February 2014]

4 comments

  1. Hi Rhonda

    Very interesting but it raises another minor peeve of mine – the use of ‘Jun’ rather than ‘June’, ‘Nov’ rather than ‘November’, etc but, as you say, this nit-picking point could be readily addressed by use of Find & Replace. Three queries:

    · The routine you set out would seem to only do one month at a time. This would be a nuisance if your document was sprinkled with dates all through the year. Any solution here?

    · Could this reformatting be done by a macro? I presume so (It’s your fault, you turned me on to macros in your last newsletter!); and

    · Can such a macro be made to work in Excel?

    Cheers

    Charles


  2. Hi Charles

    I agree, but when these dates are in tables (and you know which tables I’m talking about!), then it’s more prudent to shorten the month to 3 characters — it’s still readable and understandable as being a month, yet doesn’t cause table row information to wrap as writing the month out in full would (e.g. ‘September’).

    Yes, I’m sure there’s a macro that could be set up to do all months at once, but I just needed a ‘quick and dirty’ solution. Running this 12 times is not a big deal — and definitely quicker than doing it ‘by hand’ each time you come across one of these.

    As far as Excel goes — I have no idea! I’m an Excel ‘newbie’ and know very little about it except how to add up a column ;-)

    –Rhonda


  3. Can you please help me.I need a macro that searches word documents and transforms the date format.The documents I work with have dates written like this “13 Apr 2014” and “02 Dec 2011” and I manually have to change them to “13APR2014” and “02DEC2011”. I know this can be done with a macro but I cant do it. If it`s not that big of a trouble please help me.


  4. Hi Stefan

    You can probably do this without a macro, as long as you have a consistent pattern to the date formats AND you don’t have any other words that are the same but aren’t a month (e.g. ‘may’). Assuming you meet these criteria, you can do this with 12 Find and Replace passes (one for each month). It won’t take long and much quicker to do than figuring out a macro.
    1. Press Ctrl+H to open the Find and Replace window.
    2. In the Find What field type a space followed by the 3-letter abbreviation for the month followed by another space (e.g. Apr, where indicates you pressing the spacebar).
    3. In the Replace With field, type the upper case version of that month (e.g. APR) with NO spaces.
    4. Click Replace All.
    5. Repeat steps 2 to 4 for each 3-letter month until you’ve done them all.

    –Rhonda



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: