How do you subtract X number of weeks from a Date Field/

Avatar

Avatar

Pbhul

Avatar

Pbhul

Pbhul

06-07-2015

Looking for a Script for subtracting X number of weeks from a Date Field.

Presently, Date Field is named RTL, Number of Weeks Numerical Filed is named NumericalField6.

Result Filed is aDtae field named DSPSE.

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar

Pbhul

Avatar

Pbhul

Pbhul

07-07-2015

DSPSE=Num2Date((Date2Num(RTL.formattedValue,"MM/DD/YYYY")-NumericField6*7),"MM/DD/YYYY")

I am using FormCalc to get durations(weeks)  from a given date and working back to obtain other Milestone dates.

Getting aprompt message everytime I add a duartion " Validate DSPSE".

Thanks.

Pbhul

Avatar

Avatar

Magus069

MVP

Total Posts

1.0K

Likes

132

Correct Answer

150

Avatar

Magus069

MVP

Total Posts

1.0K

Likes

132

Correct Answer

150
Magus069
MVP

07-07-2015

Hi there,

Here are the best scripts to work with dates with JavaScript in LiveCycle Designer

Enjoy, hope this will help ya!

Adobe LiveCycle Designer Cookbooks by BR001: Date handling in Livecycle Designer ES forms