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

Re: date calculations in forms by macropod

macropod
Thu Feb 05 03:48:30 CST 2004

Hi Julie,

Go to:
http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=wrd&Number=249902
(url all one line)
where you'll find a Word file that uses fields to do this and much more with
dates.

Cheers


"Julie" <julie@hcts.net.au> wrote in message
news:21f50776.0402050055.67a9f928@posting.google.com...
> 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


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.561 / Virus Database: 353 - Release Date: 13/01/2004



Re: date calculations in forms by julie

julie
Thu Feb 05 18:48:30 CST 2004

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

Re: date calculations in forms by macropod

macropod
Fri Feb 06 03:57:43 CST 2004

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


"Julie" <julie@hcts.net.au> wrote in message
news:21f50776.0402051648.2dbccc86@posting.google.com...
> 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


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.576 / Virus Database: 365 - Release Date: 30/01/2004