![]() |
|
#2
|
||||
|
||||
|
Hi Dan,
The field coding works correctly for me. I suspect that your issue is that you're trying to generate output in a DD-MM-YYYY format whereas your system's regional settings are configured for MM-DD-YYYY. The need to modify the field codes for different regional settings is explained in the tutorial's Introduction. That aside, I'd suggest encoding the field as: Code:
{QUOTE
{SET StartDate {REF substantialcomplete}}
{SET Delay {REF scopechangeday1}}
{SET a{=INT((14-{StartDate \@ M})/12)}}
{SET b{={StartDate \@ yyyy}+4800-a}}
{SET c{={StartDate \@ M}+12*a-3}}
{SET d{StartDate \@ d}}
{SET jd{=d+INT((153*c+2)/5)+365*b+INT(b/4)-INT(b/100)+INT(b/400)-32045+Delay}}
{SET e{=INT((4*(jd+32044)+3)/146097)}}
{SET f{=jd+32044-INT(146097*e/4)}}
{SET g{=INT((4*f+3)/1461)}}
{SET h{=f-INT(1461*g/4)}}
{SET i{=INT((5*h+2)/153)}}
{SET dd{=h-INT((153*i+2)/5)+1}}
{SET mm{=i+3-12*INT(i/10)}}
{SET yy{=100*e+g-4800+INT(i/10)}}
"{dd}-{mm}-{yy}" \@ "d MMMM yyyy"}
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
| Tags |
| field day date |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
How do I get auto-updated "number of days since specified date" on MS word?
|
terry795 | Word | 16 | 01-07-2016 04:33 PM |
| Variable fields? | Emalee77 | PowerPoint | 0 | 01-30-2011 05:58 PM |
| Creating an Auto-Calc'd Date? Today+7 Days? | SoCalTelephone | Word | 0 | 10-06-2010 10:27 AM |
| how to make fields calculation variable according to the filter i use | duraid | Project | 0 | 09-09-2010 01:05 PM |
| Calculations using values from date picker controls | Inkarnate | Word | 0 | 06-09-2010 07:16 AM |