A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

DATE MergeField not formatting!



 
 
Thread Tools Display Modes
  #1  
Old April 30th, 2004, 05:36 PM
fendwick
external usenet poster
 
Posts: n/a
Default DATE MergeField not formatting!


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
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 date
remains in the source format, neither modifying the date's format, nor
removing the time -- i.e.:
1/1/1900 12:00:00 AM

I've tried enclosing the date format-picture in double-quotes, but to
no avail...

Any ideas?

fendwick


------------------------------------------------
~~ Message posted from http://www.WordForums.com/
  #2  
Old May 1st, 2004, 08:34 AM
macropod
external usenet poster
 
Posts: n/a
Default DATE MergeField not formatting!

Hi fendwick,

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

Cheers


"fendwick" wrote in message
...

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
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 date
remains in the source format, neither modifying the date's format, nor
removing the time -- i.e.:
1/1/1900 12:00:00 AM

I've tried enclosing the date format-picture in double-quotes, but to
no avail...

Any ideas?

fendwick


------------------------------------------------
~~ Message posted from http://www.WordForums.com/



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.627 / Virus Database: 402 - Release Date: 16/03/2004


  #3  
Old May 3rd, 2004, 02:14 PM
fendwick
external usenet poster
 
Posts: n/a
Default DATE MergeField not formatting!


Thanks for the suggestion, Del:

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
effect, alas!

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

If anyone has any ideas for fixing this misbehavior, or even
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


*



------------------------------------------------
~~ Message posted from http://www.WordForums.com/
  #4  
Old May 5th, 2004, 08:40 AM
Cindy M -WordMVP-
external usenet poster
 
Posts: n/a
Default DATE MergeField not formatting!

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
effect, alas!

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

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 :-)

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:17 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.