MVC View nullable Date field formatting
I am trying to display the following in a view but is giving a problem:
<td> @item.CreatedByDt.ToString("MM/dd/yyyy") </td>
Any idea on how to handle a nullable Date field in a view. I am using Razor by the way.
I am getting the following error:
No overload for method 'ToString' takes 1 arguments
If you don't know if it will be null or not...