473,396 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Calculating elapsed time from two variables

Hello,

I'm working on a form in Acrobat Pro 9 (not LiveCycle). I need to have an operator enter a beginning time (firsttime) & an end time (secondtime) & when s/he pushes a button (btncalcmix.0), the form calculates the total elapsed time. It must take into consideration that a test could begin at 4 pm & end at 8 am the next day. This is what I've put together so far.....but it doesn't work. I get this message: syntax error 10: at line 11.

Expand|Select|Wrap|Line Numbers
  1. // if button pushed, calculate mix time
  2.  
  3. var f=this.getField("btncalcmix.0");
  4. this.getField ("ttlmix").value = this.getField("dateform.secondtime").value - this.getField("dateform.firsttime").value;
  5.  
  6. if ((this.getField("dateform.secondtime").value)="" || (this.getField("dateform.firsttime").value="")); {
  7. this.getField("ttlmix").value = 0;
  8. }
  9.  
  10. if((this.getField("dateform.secondtime").value) <- this.getField("dateform.firsttime").value)) {
  11. ((this.getField ("ttlmix").value)*24)+24; 
  12. } else {
  13. this.getField("ttlmix").value)*24));
  14. }
  15.  
  16. if (f.value!= "true") {
  17. this.getField("ttlmix")=util.printd("HH:MM:ss", new Date());
  18. }
Any suggestions? Thank you in advance.
Mar 24 '09 #1
1 1734
Dormilich
8,658 Expert Mod 8TB
too many closing parentheses (1 open, 4 closing)
Mar 25 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Ron Adam | last post by:
Hi, I'm having fun learning Python and want to say thanks to everyone here for a great programming language. Below is my first Python program (not my first program) and I'd apreciate any...
12
by: Ola Natvig | last post by:
Hi all Does anyone know of a fast way to calculate checksums for a large file. I need a way to generate ETag keys for a webserver, the ETag of large files are not realy nececary, but it would be...
3
by: T-Narg | last post by:
I would like to produce the following output based on my XML file: My Album (2005) Elapsed Time (hh:mm:ss): 00:07:00 Song 1: title1 Length (hh:mm:ss): 00:02:30 Song 2: title2 Length...
4
by: bonehead | last post by:
Greetings, A friend tells me that he has not been able to work out an expression that calculates elapsed minutes from TimeA to TimeB. For example: TIMEA TIMEB ELAPASED...
1
by: pauly | last post by:
Hello All, I have been trying to create a query that extracts data from a table and calculates the elapsed time between records. The table called "Imported_table". I need to be able to calculate...
2
by: Besta | last post by:
Hello all, I am having trouble creating a windows service with a timer. Everything seems to go ok but the elapsed event does not fire.Can anyone shed any light on this, may be something simple as...
20
by: Jean Johnson | last post by:
Hello - I have a start and end time that is written using the following: time.strftime("%b %d %Y %H:%M:%S") How do I calculate the elapsed time? JJ
1
by: oakwoodman | last post by:
I writing a Linux db2 udb sql script, not procedure, and one of the things that I would like to add is the elapsed time that the script runs. I'm having trouble defining start_time, end_time and...
4
by: Brian | last post by:
I have a 2000/2002 Access db that I use to collect and store my exercisetime using a form to enter. I wanted to see a summary of the total timefor each exercise so I have a subform that does this....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.