Use the Parse() method to convert strings to DateTime instances
using System;
class MainClass
{
public static void Main()
{
DateTime myDateTime5 = DateTime.Parse("1/11/2004");
Console.WriteLine("myDateTime5 = " + myDateTime5);
}
}
Output myDateTime5 = 01/11/2004 12:00:00 AM
|
HTML code for linking to this page:
Related in same category :
-
-
-
-
-
-
-
-
-
|