S
Song
I have a field [DOB] for date of birth. Some records are blank in this
field. If non-blank, I want to calculate age, otherwise, blank as follows:
=IIf(IsNull([DOB]),"",DateDiff("yyyy",[DOB],Now())+Int(Format(Now(),"mmdd")<Format([DOB],"mmdd"))
& " Yrs")
Record with DOB field is calculated correct age. DOB blank still gives me
#Error. Which part did I do wrong? Thanks.
field. If non-blank, I want to calculate age, otherwise, blank as follows:
=IIf(IsNull([DOB]),"",DateDiff("yyyy",[DOB],Now())+Int(Format(Now(),"mmdd")<Format([DOB],"mmdd"))
& " Yrs")
Record with DOB field is calculated correct age. DOB blank still gives me
#Error. Which part did I do wrong? Thanks.