Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / May 2004

Tip: Looking for answers? Try searching our database.

DATE MergeField not formatting!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
fendwick - 30 Apr 2004 17:36 GMT
I am attempting to format a date field in a Word 2002 (10.2627.3311
Merge Main document, connecting to an SQL Server 8.0 database datetim
field, using a File DSN (ODBC) connection.  
The field-code I'm using is:
    { MERGEFIELD "Final_Payment_Date" \@ MM/dd/yyyy }

But although the document merges successfully, the returned dat
remains in the source format, neither modifying the date's format, no
removing the time -- i.e.:
    1/1/1900 12:00:00 AM
   
I've tried enclosing the date format-picture in double-quotes, but t
no avail...

Any ideas?

fendwic
macropod - 01 May 2004 08:34 GMT
Hi fendwick,

Try:
{ MERGEFIELD Final_Payment_Date \@ "MM/dd/yyyy" }

Cheers

> I am attempting to format a date field in a Word 2002 (10.2627.3311)
> Merge Main document, connecting to an SQL Server 8.0 database datetime
[quoted text clipped - 16 lines]
> ------------------------------------------------
> ~~ Message posted from http://www.WordForums.com/
fendwick - 03 May 2004 14:14 GMT
Thanks for the suggestion, Del:

I tried modifying the field by removing the double-quotes from th
db-field-name and replacing them around the date-pattern, but to n
effect, alas!

I have implemented a workaround in the SQL database, saving the dat
to an 11-char varchar field, effectively truncating off the time, bu
it is an ugly fix, especially as I don't understand why I should hav
to resort to it...!

If anyone has any ideas for fixing this misbehavior, or eve
explanations why it occurs, I should be happy to hear them!

f

del NO.SPAM wrote:
> *Hi fendwick,
>
> Try:
> { MERGEFIELD Final_Payment_Date \@ "MM/dd/yyyy" }
>
> Cheers
Cindy M  -WordMVP- - 05 May 2004 08:40 GMT
Hi Fendwick,

ODBC can do odd things, sometimes. Since you have Word 2002, have you
tried an OLE DB connection? OLE DB gives problems for Excel and Access,
but I thought it generally worked OK with SQL...?

> I tried modifying the field by removing the double-quotes from the
> db-field-name and replacing them around the date-pattern, but to no
[quoted text clipped - 7 lines]
> If anyone has any ideas for fixing this misbehavior, or even
> explanations why it occurs, I should be happy to hear them!

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :-)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.