There is no “Date” datatype in .NET (look here), only DateTime (or DateTimeOffset
). Even the Date property on a DateTime
object will return another DateTime
(with the time component set to 00:00:00).
If you want that particular format, you can format the value as a string:
$datetimevalue.ToString("dd-MM-yyyy")
CLICK HERE to find out more related problems solutions.