IF then with merged date field from excel

H

Holly

I would like to use an IF statement for a merged field but cannot seem to get
it right.

I would like to say
IF DATE_OF_HIRE is < 1/1/05 then 01/01/2005 else use the data thats in the
DATE_OF_HIRE field

Help - I dont have much hair left :)
 
G

Graham Mayor

See http://www.gmayor.com/formatting_word_fields.htm

{IF {Mergefield Date_of_Hire \@ "yyyyMMdd"} < 20050101 "01/01/2005"
"{Mergefield Date_Of_Hire \@ "MM/dd/yyyy"}"}

Change the last mask if you are not using a US date pattern.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Graham Mayor

You are welcome.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top