Setting Dates

This will set a field required to a date depending on the answer
var b = f(“required“);
var today : DateTime = DateTime.Now;
var todayPlus28 : DateTime = today.AddDays(28);
var todayPlus60 : DateTime = today.AddMonths(2);
var todayPlus180 : DateTime = today.AddMonths(6);
if (f(“required”)==(‘LM‘)){
 f(“exact_date”).set(todayPlus28)}
  if (f(“required”)==(‘N‘)){
 f(“exact_date”).set(todayPlus60)}
  if (f(“required”)==(‘GN‘)){
 f(“exact_date”).set(todayPlus180)}