Create DateTime from specified year, month, day, hour, minute, and second in CSharp
Description
The following code shows how to create DateTime from specified year, month, day, hour, minute, and second.
Example
/*from www .jav a 2 s . c om*/
using System;
public class MainClass{
public static void Main(String[] argv){
DateTime date1 = new DateTime(2010, 8, 18, 16, 32, 0);
System.Console.WriteLine(date1.ToString());
}
}
The code above generates the following result.