473,657 Members | 3,021 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calculating elapsed time from two variables

2 New Member
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 1744
Dormilich
8,658 Recognized Expert Moderator Expert
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
8798
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 feedback on how I might do things differently to make it either more consice, readable, or faster. ie... are there better ways to do it in Python? It won't break any records for calculating pi, that wasn't my goal, learning Python was. But it might...
12
12252
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 nice if I could do it. I'm using the python hash function on the dynamic generated strings (like in page content) but on things like images I use the shutil's copyfileobject function and the hash of a fileobject's hash are it's handlers memmory...
3
2635
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 (hh:mm:ss): 00:02:15
4
5578
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 ----- ----- -------- 11:30AM 12:35PM 65
1
2033
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 the difference in dates when the vin and labourop are the same and not show any other records except for these and add a new field called days elapsed and odom elapsed. Refer to rough sample data below. Anyhelp would be greatly apreciated. VIN ...
2
5154
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 I am new to this. Full code below : using System; using System.Collections; using System.ComponentModel;
20
12590
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
2166
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 elapsed_time. Start and end times should be from current time. Any help would be appreciated.
4
2430
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. Only issue is thatwhen I go over 24 hrs I get the infamous summing time issue. It would bereally easy if Access used the Excel :nn format, but it doesn't. Whycan't this be used in Access, Microsoft?????????????????..anyway Idigress. I have two...
0
8384
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8302
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8820
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8601
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5630
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1937
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.