You need to wrap the statement in an if statement to test if the date field has a value.if (weekStart <> null) then$.rawValue = num2date(dateNum,"MM/DD")endifThis will show a zero in the fields, to get rid of that set their display patterns to "Allow Zero" to rid of that.Personally I'd put all the c...