I am having trouble making a day add to a date, so far I can get the day to add to Jan. 1, 2000, what am I doing wrong with formcalc?
Views
Replies
Total Likes
Can you show what script you're using to add the day? I presume you're trying to add a day to a string that includes the date, already.
Views
Replies
Total Likes
This is the one I have been trying.
var nDate = Date2Num(DateMade,"MM/DD/YY")
$=Num2Date(nDate + Cell4, "MM/DD/YY")
Views
Replies
Total Likes
Are you sure about the format that you're getting DateMade? I tried your code, and that was the way to make it fail and always give me whatever Cell4's value was added to 1/1/2000.
Trimmed to one line.
$ = Num2Date(Date2Num(DateMade,"MM/DD/YYYY")+Cell4,"MM/DD/YYYY")
Views
Replies
Total Likes
I tried that formula and now it is going back to 1/1/1900 + number. Should I make some kind of var to make it this year?
Views
Replies
Total Likes
How about this:
if (Cell4.rawValue==null) then
$.rawValue = ""
else
Num2Date(Date2Num(Cell4.formattedValue, DateFmt(2)) + 1, DateFmt(2))
endif
Views
Replies
Total Likes
Thanks for the suggestion.
Ken Elgen
Views
Replies
Total Likes
Is Cell4 either a text field or a numeric field? Or is it something else?
Views
Replies
Total Likes
It is a dropdown field but the user can change if needed.
Views
Replies
Total Likes
Thanks for the suggestion, I really appreciate it.
Views
Replies
Total Likes
I'm not sure. I've set up something similar, and it is working. Are all of the values in the same subform? It might need more information to reference it. Do you have bindings set up for the dropdown?
Views
Replies
Total Likes