View Single Post
 
Old 01-25-2014, 12:23 AM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

To do the leap year calculation correctly, you'll need a field coded like:
{QUOTE{SET Yr {DATE \@ YYYY}}{SET Mo {DATE \@ M}}{=({=G8}=28)*((MOD(Yr,4)=0)+(MOD(Yr,400)=0)-(MOD(Yr,100)=0))*(Mo=2)*29 \# 0;;}}
In the above, '*' functions as an AND condition and '+' functions as an OR condition.

To see how to do just about everything else you might want to do with dates in Word, check out my Microsoft Word Date Calculation Tutorial, at:
http://windowssecrets.com/forums/sho...ation-Tutorial
or
http://www.gmayor.com/downloads.htm#Third_party
Do read the document's introductory material.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote