Use date.ToShortDateString() to get the date without the time component
var date = DateTime.Nowvar shortDate = date.ToShortDateString() //will give you 16/01/2019use date.ToString() to customize the format of the date
var date = DateTime.Nowvar shortDate = date.ToString('dd-MMM-yyyy') //will give you 16-Jan-2019