@using System.Globalization
@model DateTime?
@{
	Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
    var val = 
		Model.HasValue 
		?
			ViewData.ModelMetadata.DisplayFormatString != null
			? string.Format(ViewData.ModelMetadata.DisplayFormatString, Model) 
			: Model.Value.ToString(CultureInfo.InvariantCulture)
		: string.Empty;
}
@if (Model == null) 
{
    @Html.Encode(@ViewData.ModelMetadata.NullDisplayText)
}
else
{
    @Html.Encode(val)
}

