Date Conversion

M

Matt Schmunk

I need help. We have several forms built in Microsoft
Word 2000 that pull data fields from our main database.
I have a user asking me to convert a date in the format
mm/dd/yyyy, that is pulled from the database to the
following type of format: Monday, August 18, 2003. I
have found the "Date" functions in word, but those are
only used to insert a date. I need to be able to convert
a date. I have never used scripting or macros or visual
basic, so if I need to use either of those, please
provide specific directions. Thank you for any help you
can provide me!
 
J

Jay Freedman

Hi, Matt,

I'm a little short of details, so I'll assume your forms contain either (a)
text form fields in a "protected for forms" document or (b) mail merge
fields.

For (a), unprotect the template and open the properties dialog for the date
field. Set the Type box to "Date" and the "Date format" box to "dddd, MMMM
dd, yyyy". Reprotect the template and save it. As long as the data entered
into the field is a valid date, the field will reformat it properly.

For (b), open the main merge document, right-click the date merge field, and
click Toggle Field Code. Edit the field code to look like this:

{ MERGEFIELD Date \@"dddd, MMMM dd, yyyy" }

where the word "Date" here is the name of the merge field, and will probably
be different in your document. Right-click and toggle the code back again,
and save the document.
 

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