Click here to Skip to main content
15,886,773 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Please help.

Badly needed here//
Posted
Updated 23-Feb-14 22:06pm
v2
Comments
enhzflep 24-Feb-14 2:36am    
Sorry, it doesn't work like that here. You need a code supermarket if you simply wish to collect the code.

If you have tried to solve a problem and face a difficulty overcoming a particular aspect of it, then post your efforts and seek help.

As it stands, your request for code will be seen by many her as rather impolite.
Member 10617834 24-Feb-14 4:08am    
I m sorry if i asked for something wrong!! its ok if you dont help me.
Member 10617834 24-Feb-14 5:12am    
When answering a question please:

Read the question carefully.
Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.

Let's work to help developers, not make them feel stupid.
enhzflep 24-Feb-14 7:34am    
A few simple rules when posting your question.

■ Have you searched or Googled for a solution?
■ Be specific! Don't ask "I need to write a booking application". Specify exactly what it is you need help with.
■ Keep the subject brief but descriptive. eg "How do I change the dialog colour?"
■ Keep the question as concise as possible. If you have to include code, include the smallest snippet of code you can - do not dump your entire codebase.
■ Tag your question appropriately.
■ Your question may be edited or retagged by others. Anything inappropriate will be removed.
■ If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
■ Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.

To expand upon what I wrote earlier and point 0 of the above list. CodeProject QA section expects you to try google first, to at least try to solve your problem on your own. "Javascript date calculators" returns 4.11 million google results. Many of these will be perfectly suitable for you.

If you feel surprised at my original response, I suggest that you take the time to review a couple dozen questions in the QA section to improve your familiarity with it. Each forum site has it's own 'feel' and set of expectations, this one is no different in that regard.

Getting back to your original question - If you wish to read the documentation for the javascript Date object which you may use for your calculations, you may read it here: W3Schools - js Date object

Finding the difference between two time/dates is as simple as initializing two date objects with the two dates of concern, before subtracting one from another.

Try the following code:

function timeTest()
{
var d1 = new Date();
alert("Press ok to continue. (response time measured)");
var d2 = new Date();
var msDifference = d2.getTime() - d1.getTime();
alert("You took: " + (msDifference / 1000) + " seconds to press ok.");
}
Member 10617834 24-Feb-14 4:03am    
I am sorry. if i have asked for something wrong

 
Share this answer
 
Comments
Member 10617834 24-Feb-14 4:00am    
Sorry!None of the answers working. I need answers only using HTML and Javascript.
Member 10617834 24-Feb-14 5:11am    
When answering a question please:

Read the question carefully.
Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.

Let's work to help developers, not make them feel stupid.
Siva Hyderabad 24-Feb-14 5:45am    
why you feel...n taken a long class to me...
Member 10617834 24-Feb-14 4:00am    
Please Help me
Siva Hyderabad 24-Feb-14 6:03am    
http://manish4dotnet.blogspot.in/2013/02/CalculateAgeUsingJavaScript.html

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900