I\'m trying to create a string from the DateTime object which yields the format mm:dd:yyyy.
mm:dd:yyyy
Conventionally the DateTime object comes as
DateTime
Easy way, probably not the best but
DateTime dt = new DateTime(); dt = DateTime.Now; string sdate = dt.ToShortDateString(); dt = DateTime.Parse(sdate);
Or for short
var dt = DateTime.Parse(DateTime.Now.ToShortDateString());