How to Convert String to DateTime C#
DateTime dt2=DateTime.Parse(@"12-03-2012");
Console.WriteLine(dt2.ToShortDateString());
output:
12/3/2012 12:00:00 AM
DateTime dt2=DateTime.Parse(@"12-03-2012");
Console.WriteLine(dt2.ToShortDateString());
output:
12/3/2012 12:00:00 AM
No comments:
Post a Comment