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  

IF . . . THEN . . . ELSE FORMAT DATE



 
 
Thread Tools Display Modes
  #1  
Old April 20th, 2010, 08:08 PM posted to microsoft.public.word.mailmerge.fields
manatee08
external usenet poster
 
Posts: 5
Default IF . . . THEN . . . ELSE FORMAT DATE

I am trying to compare fields in a database and if NationalFilingDate is
blank, I want the field to show "ApplicationDate" instead. However,
whichever date is chosen for the field, I want the date to format as MMMM dd,
yyyy. The code is shown below. Can someone tell me what I am doing wrong?
Thanks.

{ IF { MERGEFIELD NationalFilingDate} = " " " {MERGEFIELD
NationalFilingDate" } " " {MERGEFIELD "ApplicationDate" /@ "MMMM dd, yyyy"} }
  #2  
Old April 20th, 2010, 08:15 PM posted to microsoft.public.word.mailmerge.fields
dshaulis
external usenet poster
 
Posts: 3
Default IF . . . THEN . . . ELSE FORMAT DATE

I believe you / should be the other way \ . It should be \@ "MMMM d, yyyy"

Hope that helps.

"manatee08" wrote:

I am trying to compare fields in a database and if NationalFilingDate is
blank, I want the field to show "ApplicationDate" instead. However,
whichever date is chosen for the field, I want the date to format as MMMM dd,
yyyy. The code is shown below. Can someone tell me what I am doing wrong?
Thanks.

{ IF { MERGEFIELD NationalFilingDate} = " " " {MERGEFIELD
NationalFilingDate" } " " {MERGEFIELD "ApplicationDate" /@ "MMMM dd, yyyy"} }

  #3  
Old April 20th, 2010, 10:06 PM posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default IF . . . THEN . . . ELSE FORMAT DATE

And you need the switch on both mergefields. Also a blank field is probably
"" not " "

--
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, originally posted via msnews.microsoft.com

"dshaulis" wrote in message
...
I believe you / should be the other way \ . It should be \@ "MMMM d,
yyyy"

Hope that helps.

"manatee08" wrote:

I am trying to compare fields in a database and if NationalFilingDate is
blank, I want the field to show "ApplicationDate" instead. However,
whichever date is chosen for the field, I want the date to format as MMMM
dd,
yyyy. The code is shown below. Can someone tell me what I am doing
wrong?
Thanks.

{ IF { MERGEFIELD NationalFilingDate} = " " " {MERGEFIELD
NationalFilingDate" } " " {MERGEFIELD "ApplicationDate" /@ "MMMM dd,
yyyy"} }


 




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 01:04 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.