DateTimeOffset format: mm (2)
using System;
using System.Globalization;
public class Test
{
public static void Main()
{
DateTimeOffset theTime = new DateTimeOffset(2010, 5, 1, 10, 3, 0, DateTimeOffset.Now.Offset);
Console.WriteLine("The minute component of {0} is {1}.",theTime, theTime.ToString("mm"));
}
}
//The minute component of 5/1/2010 10:03:00 AM -08:00 is 03.
Related examples in the same category