c# get date without time

C#
var dateAndTime = DateTime.Now;
var date = dateAndTime.Date;
Source

Also in C#: