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  

How do I compare later/earlier dates in a mail merge IF field?



 
 
Thread Tools Display Modes
  #1  
Old March 13th, 2006, 04:15 PM posted to microsoft.public.word.mailmerge.fields
external usenet poster
 
Posts: n/a
Default How do I compare later/earlier dates in a mail merge IF field?

I'm trying to create an IF field in a mail merge to display one of two
paragraphs depending on whether the Date of Birth field in a record is after
a certain time. I've tried using:

{ IF { MERGEFIELD Date_Of_Birth } 01/07/1976 "Text1" "Text2" }

(The date format above is UK, i.e. dd/MM/yyyy)

....but Word always seems to treat the date as a number, and so any date
later than the first of a month counts as a positive, irrespective of month
or year.
  #2  
Old March 13th, 2006, 09:17 PM posted to microsoft.public.word.mailmerge.fields
external usenet poster
 
Posts: n/a
Default How do I compare later/earlier dates in a mail merge IF field?

Use

{ IF { MERGEFIELD Date_Of_Birth \@ "yyyyMMdd" } 19760701 "Text1" "Text2" }

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

"AdamT" wrote in message
news
I'm trying to create an IF field in a mail merge to display one of two
paragraphs depending on whether the Date of Birth field in a record is
after
a certain time. I've tried using:

{ IF { MERGEFIELD Date_Of_Birth } 01/07/1976 "Text1" "Text2" }

(The date format above is UK, i.e. dd/MM/yyyy)

...but Word always seems to treat the date as a number, and so any date
later than the first of a month counts as a positive, irrespective of
month
or year.


 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I mail merge to EMAIL from MS Word AND add a pdf attachment Lily@Insight Mailmerge 24 January 15th, 2007 09:33 PM
Query - Mid Function & Mail Merge Phil C. General Discussion 4 February 9th, 2006 12:32 AM
Difficult for me, probably basic to you onlyjohn Worksheet Functions 1 February 3rd, 2006 05:14 PM
Suppressing Merge Field and text before/after julie General Discussion 8 November 14th, 2005 02:50 PM
Mail merge labels Outlook 2003 Steff Contacts 12 October 21st, 2005 11:43 AM


All times are GMT +1. The time now is 08:29 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.