C# 14 · Async, errors and resources
Work with dates and times
DateOnly and TimeOnly model a date or a time of day on its own.
var today = DateOnly.FromDateTime(DateTime.UtcNow);
var nextWeek = today.AddDays(7);
C# 14 · Async, errors and resources
DateOnly and TimeOnly model a date or a time of day on its own.
var today = DateOnly.FromDateTime(DateTime.UtcNow);
var nextWeek = today.AddDays(7);
Was this page helpful?