(XPage/JS svr-side)How to calculate the year, month and day two weeks from today?

101 Views Asked by At
var TODAY_TEMP = @Text(@Year(@Today()))+@Right("0"+@Text(@Month(@Today())),2)+@Right("0"+@Text(@Day(@Today())),2);

I need to calculate two weeks from today, I already get today, but I don't know how to get the date of after two weeks.

So sorry... I'm not familiar with how to write programs on the javascript server-side...

1

There are 1 best solutions below

0
Per Henrik Lausten On BEST ANSWER

Use the @Adjust function. Example:

@Adjust(@Today(), null, null, 14, null, null, null);