How to display the full month name and year in DataFormatString?(November-2014)
I tried using this DataAnnotation,but it does not give me the desired o/p:
[DisplayFormat(DataFormatString="0:MMMM-yyyy")]
I don't know it makes a difference 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's value. For example, in the formatting string "Item Value: {0}", the field's value is substituted for the {0} placeholder when the string is displayed in the DynamicField object. The remainder of the formatting string is displayed as literal text.
If the formatting string does not include a placeholder, the field's value from the data source is not included in the final display text.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With