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

How to get field to advance to the 1st of the next month

Avatar

Avatar
Validate 1
Level 1
OlyChristine
Level 1

Like

1 like

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
OlyChristine
Level 1

Like

1 like

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
OlyChristine
Level 1

20-03-2015

I am trying to figure out how to get a date field (effDate1) to advance to the first of the next month from the previous date field (retireDate1). For example, if I enter 03/20/2015 in the field titled retireDate1 - the next date field, titled effDate1, needs to be the 1st of the following month - 04/01/2015. Any help is greatly appreciated!!

FormCalc

Date Pattern: MM/DD/YYYY

Accepted Solutions (0)

Answers (3)

Answers (3)

Avatar

Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
Level 4

20-03-2015

I noticed that after I copy/pasted from the forum, my quotes started acting weird in LC. May have to check that.

Avatar

Avatar
Validate 1
Level 1
OlyChristine
Level 1

Like

1 like

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
OlyChristine
Level 1

Like

1 like

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
OlyChristine
Level 1

20-03-2015

syntax error near token 'do'

I should be able to figure this out, Friday brain, but I feel it's close.

Avatar

Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
Level 4

20-03-2015


if (HasValue(retireDate1)) then


  var retireDate1_ = Date2Num(retireDate1.formattedValue, "MM/DD/YYYY")


  retireDate1_ = retireDate1_ + 1


  while (Substr(Num2Date(retireDate1_,"MM/DD/YYYY"),4,2 ne "01") do


    retireDate1_ = retireDate1_ + 1


  endwhile


  $ = Num2Date(retireDate1_, "MM/DD/YYYY")


endif


See if that works for you.