Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Add one day (date) to each row instance

Avatar

Avatar
Level 1
walkerb3
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
walkerb3
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile
walkerb3
Level 1

04-01-2021

I'm trying to do the following with formCalc, but javascript will do as well.  I have a travel expense form with a travel start and end date field.  The difference in days sets the instances of an expense table. I'm trying to get the first row = to the start date; for each subsequent row, I'm trying to add a day to each row.  I've declared a variable to formate the date to a number (var startDate2Num = Date2Num(sf_Header.tbl_Header.Row3.dtd_Start,"YYYY-MM-DD")).  That works; however, I cannot add 1 to each subsequent instance. 

FormCalc javascript

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Affirm 100
MVP
shelly-goel
MVP

Likes

243 likes

Total Posts

409 posts

Correct Reply

104 solutions
Top badges earned
Affirm 100
Give Back 25
Ignite 3
Give Back 10
Validate 1
View profile

Avatar
Affirm 100
MVP
shelly-goel
MVP

Likes

243 likes

Total Posts

409 posts

Correct Reply

104 solutions
Top badges earned
Affirm 100
Give Back 25
Ignite 3
Give Back 10
Validate 1
View profile
shelly-goel
MVP

04-01-2021

@walkerb3 

You can try this: Num2Date(Date2Num(sf_Header.tbl_Header.Row3.dtd_Start,"YYYY-MM-DD") + 1)

And a similar example available here:

https://experienceleaguecommunities.adobe.com/t5/adobe-livecycle-questions/adding-days-to-a-date/qaq...

Answers (0)