Format the field of DATE

L

LS

I have a field of DATE in data source file entered as 051025 to mean yyMMdd.
How do I format the field in main document to show the date as 2005-10-25 or
2005/10/25 ? Thanks.
 
D

Doug Robbins - Word MVP

I don't think that it is possible to do that using formatting switches on
the field. This means that you would either have to do modify the data
source, or after executing the merge to a new document, do a wildcard Find
and Replace where you search for

([0-9]{2})([0-9]{2})([0-9]{2})

and replace that with

20\1/\2/\3

To learn about use a wildcard search, see the article "Finding and replacing
characters using wildcards" at:

http://www.word.mvps.org/FAQs/General/UsingWildcards.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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