[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 864
  • Last Modified:

Javascript - get date 2 days from now?

Can this be modified to display the date 2 days from now?

var thisDay = new Date();
alert(thisDay);

Thanks in advance for your help.
0
sabecs
Asked:
sabecs
1 Solution
 
ChristoferDutzCommented:
Try this
//create the date
var myDate = new Date();
 
//add a day to the date
myDate.setDate(myDate.getDate() + 2);

Open in new window

0
 
sabecsAuthor Commented:
Thanks, perfect.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now