Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to subtract days from a given date?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 161
    Comment on it

    Hello Reader's. If you have given a date and you just need to add or subtract number of days from it then you can use the code below:-

    var SubDays = 15;
    $.datepicker.formatDate('yy/mm/dd', new Date() - SubDays) ;
    

    Or you can also calculate as follows:-

    new Date(new Date().setDate(new Date().getDate()-5))
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: