What I need to do is get the current date and do a math formula to figure out how many days from a recorded date in a record. Is there a Jquery or javascript function to do this?
Asked
Active
Viewed 66 times
-2
-
[JavaScript Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) – Jay Blanchard Oct 06 '14 at 16:17
1 Answers
0
you can use this code to find number of days between two dates.
var d1=new Date(2014,06,15);
var d2=new Date(2014,06,10);
var timeInSec=d1-d2;
var days=timeInSec/(1000*60*60*24);

Gursharan Singh
- 96
- 4