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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|