Sorry to follow this one up so late, but I'm still trying to get it to
work. At the moment the code I have is as follows:
{IF {InstDate} >= {CDate} "will soon be out of warranty." "is now out
of warranty"}
The problem is that everything is coming through as TRUE, and so
ievery record shows "will soon be out of warranty", which is obviously
not rue, as it shows the expiry date (InstDate) at the top of the
page. CDate is just today's date.
Does Word have a problem with dates in general? I know that if I try
and use an Excel spreadsheet as a data source and it has dates in it,
then Word will put my dates into the American format, even although I
have them in the British format.
This time I have been using a raw text file as the data source, and
the dates are showing correctly but I get the impression that Word is
struggling to compare dates, and that I maybe have to do something to
the dates first to get it to compare correctly.
ANy suggestions anyone?
Andrew Hargreaves
>Andrew,
>
[quoted text clipped - 37 lines]
>>Andrew H
>>.
Cindy M -WordMVP- - 11 Oct 2003 10:31 GMT
> Does Word have a problem with dates in general?
Yes, definitely.
You may want to try including a date-picture switch in the fields (and
leave the term Mergefield in them!) to see if that helps at all. I might
try \@ "yyyy-mm-dd" to achieve the best comparison.
> Sorry to follow this one up so late, but I'm still trying to get it to
> work. At the moment the code I have is as follows:
[quoted text clipped - 16 lines]
> struggling to compare dates, and that I maybe have to do something to
> the dates first to get it to compare correctly.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.mvps.org/word
This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :-)
Marty - 08 Dec 2003 15:21 GMT
Andrew,
Did you receive a workable answer to your query "caomparing two dates" ?? If you did can you please share the answer, as i am having to copare two dates and find the same problems that you faced.
Marty