Format DateTime to string for parsing in CSharp
Description
The following code shows how to format DateTime to string for parsing.
Example
/*from w w w .ja va 2 s . com*/
using System;
public class MainClass{
public static void Main(String[] argv){
DateTime date2 = new DateTime(2008, 1, 1, 0, 30, 45, 125);
System.Console.WriteLine("Date: {0:o}", date2);
}
}
The code above generates the following result.