Calculation of time with FormCalc

Hello!

I am trying to create a simple time sheet form in the designer, but things don't seem to work in the way that I expected.

I have two time fields where users are supposed to inform the hours start and end time for a job. A third hour field must display the elapsed time.

So, I tried to solve this problem with FormCalc:

var interval = 0

interval = Time2Num (endTime.formattedValue, "HH: mm")-Time2Num (startTime.formattedValue, "HH: mm")

$.formattedValue = Num2Time (interval, "HH: mm")

It does not work. I mean, if I inform startTime = 10:00 and endTime = 11:00, the result is 23:00. How is it?

Now, if I inform startTime = 09:00 and endTime = 11:00, the result is 00:00.  Huh?

Please, could someone tell me what I'm doing wrong here?

Greetings of the season!

Marcos

Hello

Check this thread.

It describes a solution for this kind of calculation.

http://forums.Adobe.com/message/4054814#4054814

Tags: Adobe LiveCycle

Similar Questions

Maybe you are looking for

  • ListBox problem highlighting

    I'm having a problem with a listbox in 7.1.1.  I have 'item 1' game selection mode.  Sometimes the item highlighted in the list box is changed manually with a mouse click, and sometimes it is changed programmatically. My problem is that sometimes sha

  • Sizing of the 50 orders/lights on the front panel to look like

    Hello I have 50 rectangular bollean indicators on the front panel. For some reason, the sizes of a few indicators are slightly different from the others. If I resize with the mouse it oversizes it. Can't think of an intuitive method to achieve this.

  • Aspire E5-521 - 625 B update after Windows 10

    Good morning - first post here... Laptop came with Win8.1 and I followed the instructions to upgrade onsite at Win10. Seemed to go well. On the Acer site for driver updates etc check, I noticed that there is a BIOS update available (v1.04). It is rec

  • HP Pavilion dv6707us webcam corrupted by Vista updates.

    My HP Pavilion dv6707us says «unrecognized webcam»  I tried the driver updates - but because the webcam is not recognized - it can not download updates.  I read online that this was due to the automatic updates of Windows Vista (Home Premium).  How c

  • Cannot start the HP printing software (HP OfficeJet Pro 8500 A910a)

    Hello When I double-click the icon of the HP software on my desktop behavior strange results. Nothing opens and my computer behaves erratically. After a while I get the following error messages: instancefinderdlg.exe werfault.exe Then after that - my