DataAnnotation to display the name of the month
2 answers
I don't know if it matters or not, but how about:
[DisplayFormat(DataFormatString = "{0:MMMM-yyyy}")]
From DisplayFormatAttribute.DataFormatString
property
The formatting string can be any literal string and usually includes a placeholder for the field value. For example, in the formatting string "Item Value: {0}", the field value is replaced with {0} placeholder when the string is displayed in the DynamicField object. The rest of the formatting string is displayed as literal text.
If there is no placeholder in the formatting string, the value field from the data source is not included in the final display text.
+3
source to share