Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Adding days to a date

$
0
0

I can't get my code to work, I've read over most of the other posts regarding Adding days to a date, and I'm can't figure out why my code isn't working.

 

Date1 field is a Date/Time field: I want the user to select a date

Date2 field is a field that I would like a new date (Date1 + 21 days) to automatically populate.

 

Here is my code, it is set to run when the user exits Date1.

 

var Date1 = Date2Num ($, "yyyy-mm-dd")

Date2 = Num2Date (Date1 + 21, "yyyy-mm-dd")

 

The result is y-m-d in the Date2 field. I have tried making Date2 a text field, numeric field, and another Date/Time field, the result is always the same.


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>