No there isn’t. DateTime
represents some point in time that is composed of a date and a time. However, you can retrieve the date part via the Date
property (which is another DateTime
with the time set to 00:00:00
).
And you can retrieve individual date properties via Day
, Month
and Year
.
UPDATE: In .NET 6 the types DateOnly
and TimeOnly
are introduced that represent just a date or just a time.