Home » FAQ » Blazor » General » How do I display a server’s date and time on a Blazor component?
Use the DateTime.Now property to display the server’s date and time in a Blazor component. Follow this code snippet to do this.
[Index.razor]
@page "/" <h3>@DateTime.Now</h3>
Refer to this documentation for more details.
Platform BlazorASP.NETWinFormsWPF.NET MAUI
Question *
Answer (Optional)
Email (Optional)
Email address is only for further clarification on your FAQ request. It will not be used for any other purpose.
Please leave this field empty.
Share with