# Total Hours Calculation.

Murugesan
Total Hours Calculation.
1 Answer(s)      6 years and 4 months ago
Posted in : JavaScript Questions

Hi,How to calculate the total hours by startime and endtime.not railway time just only normal time.please help.

Thanks.

March 28, 2011 at 3:15 PM

Hi,

```function calcHours(){
var date1 = document.getElementById('d1').value;
var date2 = document.getElementById('d2').value;
date1 = date1.split("-");
date2 = date2.split("-");
var sDate = new Date(date1[0]+"/"+date1[1]+"/"+date1[2]);
var eDate = new Date(date2[0]+"/"+date2[1]+"/"+date2[2]);
var hourhsDifference = Math.abs(Math.round((sDate-eDate)/1000*60*60));
}

```

Total Hours Calculation.
Total Hours Calculation.   Hi,How to calculate the total hours by startime and endtime.not railway time just only normal time.please help. Thanks
calculate total hours by start time and end time in javascript - Ajax
calculate total hours by start time and end time in javascript  hi, i... well. i want to display total hours by using start and end timepicker. pls clarify my doubts. how to calculate total hours by using start and end time field
calculation
calculation  helo all, can any one tell me ...how to add values taken from text box and display it to user. the requirement is..from total amount to be paid and total paid we have to find the due amount to be paid..and each
age calculation
age calculation  pls send me the age calculation validation coding in java script. i'm waiting for ur reply
tax calculation
tax calculation  I want you to write a program while take some amount and do the tax calculation Sr.No. Particulars Present Rate Amount in INR 1 Service Fee - 100 2 Service tax Tax 12.00% 12 Education cess
total id
total id  how to print and total my id number ..for example if my id is 0123456789 the output will look like this : 0123456789 0+1+2+3+4+5+6+7+8+9=45 help me plz
calculation after if. user input
calculation after if. user input  System.out.print ("please select... it should add up total. It doesn?t seem to do that without the ifs, if else it will. I...("Total Cost: "+totalcost
How to calculate attending hours?
How to calculate attending hours?  I need to calculate attending hours of a employee in a day in my project to make their monthly salary . By using work starting time and ending time. How should I do it using Date class? Or any
Calculation Example
Calculation Example      .... This code displays the product name and their price with the total amount...("./src/velocity/calculation/Product.vm");
How to display a file for 24 hours?
How to display a file for 24 hours?  How to display a file for 24 hours
program to print total marks
program to print total marks  program to input total marks out of 600 marks as an argument and print the stream allotted using the following criteria 401 & above - PCM 301-400 - ZBC 201-300- Commerce 101-200 - Arts
How to learn hibernate in 24 hours?
How to learn hibernate in 24 hours?  Hi, I am assigned a new project and after 2 days I have to start working on it. I have 48 hours with me. I will spend 24 hours from 48 hours. I want to learn Hibernate in just 24 hours
Java add hours to Date In this tutorial, you will learn how to add hours... used in date time manipulation. Here, we are going to add few hours to current...() of Calendar class, we have added 4 hours to the calendar which in result display
Total summay from a sale table
Total summay from a sale table  Total summay from a sale table
cache refresh after 24 hours
cache refresh after 24 hours  I have developed an application which uses websphere application server 6.1 which needs to query the database(oracle) after every 24 hours periodically.But it is not getting executed properly because
how to print of hours and minutes of 8725 seconds
how to print of hours and minutes of 8725 seconds  how to print of hours and minutes of 8725 seconds
how many hours and minutes in 8725 seconds
how many hours and minutes in 8725 seconds  how many hours and minutes in 8725 seconds? Thanks
Java program to generate the total count
Java program to generate the total count  I need a java program which would take a text file as an input and scans through it to generate the output. For Ex. : If the text file contains the following information: There is/are 3
how to done calculation for dynamic generated textboxes in jquery/javascript/ajax?
how to done calculation for dynamic generated textboxes in jquery/javascript/ajax?  how to done calculation for dynamic generated textboxes in jquery/javascript/ajax
Find total disk space in PHP, php disk_total_space, disk_total_space
Learn How to Get the total disk space in PHP Program. In this PHP Tutorial example we will use the disk_total_space() function in our PHP code to find the total disk space. syntax disk_total_space() Function PHP disk_total_space
how to convert time in milliseconds in to hours - Java Beginners
how to convert time in milliseconds in to hours  hello, can anyone tell me how i can convert the time in milliseconds into hours or to display it in seconds in java
how to convert time in milliseconds in to hours - Java Beginners
how to convert time in milliseconds in to hours  hello, can anyone tell me how i can convert the time in milliseconds into hours or to display it in seconds in java
Write a query to find the total number of rows in a table
Write a query to find the total number of rows in a table  Write a query to find the total number of rows in a table?   Hi, Here is the answer, we can find the total number of rows in a table using following query
java total lost data in hard drive
java total lost data in hard drive  please help me, i need java source code about total lost data in hard drive. how to find the total deleted data ih hard drive using java programming... this my project...pls help me
java total lost data in hard drive
java total lost data in hard drive  please help me, i need java source code about total lost data in hard drive. how to find the total deleted data ih hard drive using java programming... this my project...pls help me
java total lost data in hard drive
java total lost data in hard drive  please help me, i need java source code about total lost data in hard drive. how to find the total deleted data ih hard drive using java programming... this my project...pls help me
JAVA TOTAL LOST DATA IN HARD DRIVE
JAVA TOTAL LOST DATA IN HARD DRIVE  please help me, i need java source code about total lost data in hard drive. how to find the total deleted data ih hard drive using java programming... this my project...pls help me
calculate difference of two times and express it in terms of hours
); out.println(diffInHours+"<br>"); out.println("Hours " + (int... of hours
calculate difference of two times and express it in terms of hours
); out.println(diffInHours+"<br>"); out.println("Hours " + (int... of hours
calculate difference of two times and express it in terms of hours
); out.println(diffInHours+"<br>"); out.println("Hours " + (int... of hours
Java file get total space
Java file get total space In this section, you will learn how to get the total...("C:"); long totalSpace = file.getTotalSpace(); System.out.println("Total Space = " + totalSpace + " bytes"); } } You can find the total space