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 23:10:30");
Console.WriteLine("myDateTime5 = " + myDateTime5);
}
}
Output myDateTime5 = 01/11/2004 11:10:30 PM
|
HTML code for linking to this page:
Related in same category :
-
-
-
-
-
-
-
-
-
|