- I assume you just forgot the quotation marks around
MM/dd/yyyy
here. - Your input date string does not match the formats "MM/dd/yyy" or "MM-dd-yyyy".
- The format "MM-dd-yyyy" is uncommon (English date format with '-' separator).
To find out what applies, you should print out
model.ExpiryDate
to see which format is used.