c# get year from date code example
Example 1: get day month year from date c#
// can add : or / to seperate dates and time
DateTime.Now.ToString("yyyyMMddhhmmss")
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>