Different between two date in javascript

calculating difference between two dates in java script





<script>
function changedays(x){
 //df=$('#txtfdat').val();
 //dt=$('#txttdate').val();
df='05-Jan-2012';
dt='10-Jan-2012';
 d1=Date.parse(df);
 d2=Date.parse(dt);
    var one=1000*60*60*24  
    d3=d2-d1;
   d4=d3/one;
   alert(d4);
}
</script>

Comments

Popular posts from this blog

Call PHP Function In JavaScript Using Ajax

List of Post Category Wise in wordpress