C# datetime year code example
Example 1: c# datetime
var dat1 = new DateTime();
// The following method call displays 1/1/0001 12:00:00 AM.
Console.WriteLine(dat1.ToString(System.Globalization.CultureInfo.InvariantCulture));
// The following method call displays True.
Console.WriteLine(dat1.Equals(DateTime.MinValue));
Example 2: c# @datetime show only year
<footer class="border-top footer text-muted">
<div class="container">
© @DateTime.UtcNow.Year - Home <a asp-area="" asp-controller="Home" asp-action="Privacy"></a>
</div>
</footer>