date calculations in forms

  • Thread starter Thread starter Julie
  • Start date Start date
J

Julie

Hi All

i am trying to set up a word form that calculates the number of days
between two dates (stored as two bookmarked fields 'start' & 'finish')

i've set calculate on exit on both and a third field called 'days' as
a calculation field with the formula =finish-start

when it sort-of works (doesn't always) it gives a wrong answer e.g.
start = 1/1/04
finish = 2/1/04
days = .25

i know that this can also be done using vba and the datediff function
but i would like to avoid that solution.

any ideas - using word 2002

regards
JulieD
 
Hi macropod

great document ... and demonstrates how to do it nicely - thanks!!!!

however, the reason i posted the question is that i have a word manual
here with an exercise that basically says to enter a date in a form
field called "start" and another in a form field called "finish" and
then in a calculated form field a formula =finish - start
and says that it should work - is the manual therefore wrong????

I found some old posts in google (1999 era) that say word can't do
this this simply - is this still the case in 2002/2003 version?

appreciate any insight you (or anyone else) can provide on this.

Regards
julied
 
Hi Julie,

Unless your form fields trigger a macro that calculates the difference, then
Word can't do it without help. Indeed, as soon as you try to do maths with a
date in the form dd/mm/yy Word treats it as a stacked division, while dd mm
yy is treated as an addition and dd-mm-yy is treated as a subtraction!
Nothing's changed for the better with the latest versions.

Cheers
 
Back
Top