calculate days between dates
<p>I'm trying to calculate the days between 2 dates but just keep getting "NaN. I've looked at other posts but can't quite work it out :-S</p>

<pre><code>function checkdate() {

var currentTime = new Date()
var month = currentTime.getMonth() + 1
var day = currentTime.getDate()
var year = currentTime.getFullYear()
var datenow = (day + "/" + month + "/" + year)  


var startdate = document.forms[0].datescopestart.value;
var sDate = new Date(Date.parse("startdate","dd/mm/yy"));

var totaldays = Date.datenow - Date.sDate;  
    alert(totaldays);
    }
</code></pre>
