If you need to retrieve just the Date and not DateTime of a function, use DateOnly
Eugene Fischer in C#