Add days to a date

Hi.

How I can add some days to a specific date?
There is a default function?

thanks for help!

If you take a look at the mod-datejs library for Servoy (Overview - mod_datejs - ServoyForge) that should have all the date functionality you’ll ever need. It’s based on the commonly used Javascript date.js library.

More easy:

var date = new Date();
date = date.setDate(date.getDate()+2)

in this case, we add 2 days to the actual date.

AlanBourke:
If you take a look at the mod-datejs library for Servoy (Overview - mod_datejs - ServoyForge) that should have all the date functionality you’ll ever need. It’s based on the commonly used Javascript date.js library.

I’ve found a similar solution here http://forum.html.it/forum/showthread/t-776017.html

thank you anyway.

pentamsi:
More easy:

var date = new Date();

date = date.setDate(date.getDate()+2)




in this case, we add 2 days to the actual date.

I’ve try but not work.

try with no assign the data at himself, this is the way that i use and work fine

I like to use the free DateUtils add-in from Dr Maison & Partner GmbH

http://www.servoy-plugins.de/plugins/da … lugin.html

then it’s just … one neat line
var ldStart = plugins.DateUtils.DateTime(new Date()).addDays(-30).date; // addMonths(-1).date;