I need to remove time portion of date time or probably have the date in following format in object form not in the form of string.
object
string
You can use this simple code below.
Code: DateTime.Now.ToShortDateString();
Ex. Console.WriteLine(DateTime.Now.ToShortDateString());