


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
Views
Replies
Sign in to like this content
Total Likes
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.
Views
Replies
Sign in to like this content
Total Likes
syntax error near token 'do'
I should be able to figure this out, Friday brain, but I feel it's close.
Views
Replies
Sign in to like this content
Total Likes
I noticed that after I copy/pasted from the forum, my quotes started acting weird in LC. May have to check that.
Views
Replies
Sign in to like this content
Total Likes