Word 2k: Date formatting question #2

N

Neil Marsh

As I mentioned before, I am using this formula to format the dates
coming over from my Access database:

{ MERGEFIELD Date \@ "MMM. d, yy" }

To give me the following result:

Apr. 1, 80

This works fine, except when the month is May. Then I get this:

May. 28, 80

I'd also like to get:

June instead of Jun.

and

July instead of Jul.

Is this something that I can fix using merge formulas or would I need to
record the process with a macro? It would be nice to have it all done
without me having to do anything special (don't we all want things like
that?).

Yeah, I know I'm being anal, but it would make my life easier if I
didn't have to do much manual tweaking of the pages once the merge is
done.

Thanks!

---
Neil Marsh * (e-mail address removed)
Cambridge, MA * http://AudioBoy.net

****************************************************************
"In the dream you are falling, lost in the listening distance as
dark locks in ... Nightfall!"

-- Opening narrative to "Nightfall"
CBC Radio horror anthology, 1980-1983
****************************************************************
 
M

macropod

Easy! Just change
{ MERGEFIELD Date \@ "MMM. d, yy" }
to
{ MERGEFIELD Date \@ "MMMM. d, yy" }

Cheers
 
D

Doug Robbins - Word MVP

Hi Neil,

I would suggest that you use a query in the database to get the dates into
the format that you want and then use the query as the datasource.

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
D

Doug Robbins - Word MVP

Hi macropod.

But that gives you

May.

June.

July.

He did not want the period after the months that were not abbreviated.

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
M

macropod

Missed that!

Can be fixed with:

{IF {MERGEFIELD Date \@ "M "}= 5 {MERGEFIELD Date \@ "MMMM
d, yy"} {MERGEFIELD Date \@ "MMM. d, yy"}}

Cheers
 
M

macropod

Hi Neil,
Correction:

{IF {MERGEFIELD Date \@ "M "}= 5 {MERGEFIELD Date \@ "MMMM
d, yy" } {MERGEFIELD Date \@ "MMM. d, yy"}}

Cheers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top