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.

View Answers

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));
  alert("hourhsDifference :"+hourhsDifference );
}









Related Tutorials/Questions & Answers:
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
Advertisements
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
ModuleNotFoundError: No module named 'calculation'
ModuleNotFoundError: No module named 'calculation'  Hi, My Python... 'calculation' How to remove the ModuleNotFoundError: No module named 'calculation' error? Thanks   Hi, In your python environment
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 ADS_TO_REPLACE_1 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
ModuleNotFoundError: No module named 'refund_calculation'
ModuleNotFoundError: No module named 'refund_calculation'  Hi, My... named 'refund_calculation' How to remove the ModuleNotFoundError: No module named 'refund_calculation' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'simplex_calculation'
ModuleNotFoundError: No module named 'simplex_calculation'  Hi, My... named 'simplex_calculation' How to remove the ModuleNotFoundError: No module named 'simplex_calculation' error? Thanks   Hi
ModuleNotFoundError: No module named 'Solar-Calculation'
ModuleNotFoundError: No module named 'Solar-Calculation'  Hi, My... named 'Solar-Calculation' How to remove the ModuleNotFoundError: No module named 'Solar-Calculation' error? Thanks   Hi, In your
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
ModuleNotFoundError: No module named 'total'
ModuleNotFoundError: No module named 'total'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'total' How to remove the ModuleNotFoundError: No module named 'total'
How to display a file for 24 hours?
How to display a file for 24 hours?  How to display a file for 24 hours
Calculation Example
Calculation Example      .... This code displays the product name and their price with the total amount...; Velocity.getTemplate("./src/velocity/calculation/Product.vm");   
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
ModuleNotFoundError: No module named 'opening_hours'
ModuleNotFoundError: No module named 'opening_hours'  Hi, My... 'opening_hours' How to remove the ModuleNotFoundError: No module named 'opening_hours' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'pyopening_hours'
ModuleNotFoundError: No module named 'pyopening_hours'  Hi, My... named 'pyopening_hours' How to remove the ModuleNotFoundError: No module named 'pyopening_hours' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'steelscript.appfwk.business-hours'
ModuleNotFoundError: No module named 'steelscript.appfwk.business-hours' ...: ModuleNotFoundError: No module named 'steelscript.appfwk.business-hours' How to remove the ModuleNotFoundError: No module named 'steelscript.appfwk.business-hours'
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
Total summay from a sale table
Total summay from a sale table  Total summay from a sale table
Java add hours to Date
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
ModuleNotFoundError: No module named 'total-ordering'
ModuleNotFoundError: No module named 'total-ordering'  Hi, My... named 'total-ordering' How to remove the ModuleNotFoundError: No module named 'total-ordering' error? Thanks   Hi, In your python
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
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
ModuleNotFoundError: No module named 'osm-humanized-opening-hours'
ModuleNotFoundError: No module named 'osm-humanized-opening-hours'  ...: No module named 'osm-humanized-opening-hours' How to remove the ModuleNotFoundError: No module named 'osm-humanized-opening-hours' error? Thanks
ModuleNotFoundError: No module named 'osm_opening_hours'
ModuleNotFoundError: No module named 'osm_opening_hours'  Hi, My... named 'osm_opening_hours' How to remove the ModuleNotFoundError: No module named 'osm_opening_hours' error? Thanks   Hi, In your
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.ADS_TO_REPLACE_1 syntax disk_total_space() Function PHP
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
ModuleNotFoundError: No module named 'location-history-total'
ModuleNotFoundError: No module named 'location-history-total'  Hi...: No module named 'location-history-total' How to remove the ModuleNotFoundError: No module named 'location-history-total' error? Thanks   Hi
ModuleNotFoundError: No module named 'mantid-total-scattering'
ModuleNotFoundError: No module named 'mantid-total-scattering'  Hi...: No module named 'mantid-total-scattering' How to remove the ModuleNotFoundError: No module named 'mantid-total-scattering' error? Thanks   
ModuleNotFoundError: No module named 'mantid-total-scattering'
ModuleNotFoundError: No module named 'mantid-total-scattering'  Hi...: No module named 'mantid-total-scattering' How to remove the ModuleNotFoundError: No module named 'mantid-total-scattering' error? Thanks   
ModuleNotFoundError: No module named 'total-connect-client'
ModuleNotFoundError: No module named 'total-connect-client'  Hi...: No module named 'total-connect-client' How to remove the ModuleNotFoundError: No module named 'total-connect-client' error? Thanks   Hi
ModuleNotFoundError: No module named 'odoo8-addon-product-template-book-weight-calculation'
-calculation'  Hi, My Python program is throwing following error...-weight-calculation' How to remove the ModuleNotFoundError: No module named 'odoo8-addon-product-template-book-weight-calculation' error? Thanks
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
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,ADS_TO_REPLACE_1 we can find the total number of rows in a table using
How many hours do data scientists work?
How many hours do data scientists work?  Hi, I am beginner in Data...: How many hours do data scientists work? Try to provide me good examples or tutorials links so that I can learn the topic "How many hours do data
How many hours should I practice programming?
How many hours should I practice programming?  Hi, I am beginner... to learn: How many hours should I practice programming? Try to provide me good examples or tutorials links so that I can learn the topic "How many hours
Do data scientists work long hours?
Do data scientists work long hours?  Hi, I am beginner in Data... data scientists work long hours? Try to provide me good examples or tutorials links so that I can learn the topic "Do data scientists work long hours
How many hours does a data scientist work?
How many hours does a data scientist work?  Hi, I am beginner... to learn: How many hours does a data scientist work? Try to provide me good examples or tutorials links so that I can learn the topic "How many hours does
Java file get total space
Java file get total space In this section, you will learn how to get the total...(); System.out.println("Total Space = " + totalSpace + " bytes"); } } You can find the total space of a disc or partition using the method
Modify the sales tax program to accept an arbitrary number of prices, total them, calculate the sales tax and print the total amount.
Modify the sales tax program to accept an arbitrary number of prices, total them, calculate the sales tax and print the total amount.  Modify the sales tax program to accept an arbitrary number of prices, total them, calculate
calculate difference of two times and express it in terms of hours
); out.println(diffInHours+"<br>"); out.println("Hours " + (int... of hours

Ads