Forum guidelines
AuthorQuestion
Can any one help to Solve this to Project
Posted By Senthil Nathan on 21 Aug 2013
timedifference_javascript.rar HI all,

 This is time calculation in javascript in gridview  .....

can any one help to solve this.........

AuthorReply
Re: Can any one help to Solve this to Project
Posted By Iftikar Hussain on 21 Aug 2013  
Hi,
        What issue you are getting? Provide the details.
You can calculate time difference as like below in javascript

var today = new Date();
var Christmas = new Date("12-25-2012");
var diffMs = (Christmas - today); // milliseconds between now & Christmas
var diffDays = Math.round(diffMs / 86400000); // days
var diffHrs = Math.round((diffMs % 86400000) / 3600000); // hours
var diffMins = Math.round(((diffMs % 86400000) % 3600000) / 60000); // minutes
alert(diffDays + " days, " + diffHrs + " hours, " + diffMins + " minutes until Christmas 2009 =)");


Regards,
Iftikar

Remember to click "Mark as Answer" on the post, if it helps you.

SPONSORED BY

Custom Software Development
MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.