Date: Fri, 14 May 2010 17:05:54 -0500
Reply-To: Mike South <msouth@GMAIL.COM>
Sender: Vanagon Mailing List <vanagon@gerry.vanagon.com>
From: Mike South <msouth@GMAIL.COM>
Subject: Re: NOT VAN RELATED AT ALL ... Java Script or FormCalc people
only please ... A request for ...
In-Reply-To: <AANLkTikGxYFuWgIj6FdSfVWyGBNtxVPrnj8lWqJu_ua6@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
1600 - 0630 = 970 (and is completely meaningless). 970 * .01 = 9.7
(you typed 9.1, I think you meant 9.7)
your formula is apparently expecting things in hundreds of hours (!)
but you are putting in a string with a time in hours in the "hundreds"
place and a two digit number representing the number of minutes past
the hour in the tens and ones. Unfortunately this is mathematically
meaningless when you subtract.
Think about a start time of 6:30 and end time of 7:00. As done in
this formula the subtraction would be
700 - 630 = 70
because the subtraction looks at those as base 10 numbers, which they aren't.
If you need something quick and dirty you can lose the *.01 in the
formula and enter the hours as "6.5" for 6:30 and "16" for 16:00.
Then the hours worked would be a simple subtraction.
It's unlikely that humans are going to be good at putting in their
hours correctly that way, though.
pmail me if you have further questions.
mike
On Fri, May 14, 2010 at 4:06 PM, Roger Whittaker <rogerwhitt1@gmail.com> wrote:
> dear vanagoners with Adobe knowledge
>
> i am trying to create a form using livecycle designer ES2
> which is a form creation program that Windows users of Acrobat Pro will be
> familiar with ...
> it uses an ISO format called FormCalc for these functions
> also uses JavaScript but i am not easily grasping that one either
> (but if i had the string that worked i could insert)
>
> the big problem is i am trying to get a time equation to work within the
> fields of the form
>
> the issue is this ...
> i enter 0630 as a start time ... and 1600 as a finish time = hours worked
> return is 9.1 ... tragically this has detrimental results for the overtime
> field and the total time field which both take their values from the hours
> worked +/_
>
> the string looks like this SUM(+Finish_Time-Start_Time)*.01
>
> what i require for a return is the .5 of an hour ... rather than the .7
> which is in correct ..
> NOTE if i ditch the *.01 the number rounds up ...
>
> WHAT am i missing ... ???
>
> thanks in advance
> yours
>
> --
> roger w
> From Proverbs:
> Under three things the earth trembles, under four it cannot bear up: a
> servant who becomes king ...
> ----------------------------------------------------------
> Explore printed work at: http://www.prliving.ca/
> View the growing list of video work at:
> http://revver.com/find/video/?query=LastonLastof&search_on=owners
>