If ( PatternCount ( Day & Month & Year ; "NA" ; "NA" ; //put your original calculation here )
But I recommend that you also set up a calculation such as:
If ( ISValid ( GetAsDate ( Expiry_date ) ) ; GetAsDate ( Expiry_date ) ) //I am assuming that your locality settings specify the DD/MM/YYYY format
And select Date as the result type. That will give you a value that works better for sorting and searching by date.
I set up an additional field titled: expiry_date_portal and used your calculation:
If ( IsValid (GetAsDate(expiry_date)) ; (GetAsDate(expiry_date)) ; "N/A")
i will now use the expiry_date_portal field in my searchesto look for expired dates.
Many thanks for your help
That's not the function that I recommended. The calc I recommended leaves the field empty if the result from the other field is "N/A" as that text is not a valid date and will result in an error result.