DateTimeOffset custom format specifier: dd MMM yyyy : DateTimeOffset Format « Date Time « C# / C Sharp






DateTimeOffset custom format specifier: dd MMM yyyy

DateTimeOffset custom format specifier: dd MMM yyyy
  

using System;

public class Test
{
   public static void Main()
   {
        DateTimeOffset thisDate = new DateTimeOffset(2010, 4, 17, 2, 32, 0, new TimeSpan(-5, 0, 0));
        string fmt;                      

        fmt = "dd MMM yyyy";
        Console.WriteLine("'{0}' format specifier: {1}", fmt, thisDate.Date.ToString(fmt));
   }
}        
        
//'Y' format specifier: April, 2010

   
    
  








Related examples in the same category

1.DateTimeOffset format: D (2)DateTimeOffset format: D (2)
2.DateTimeOffset format: dDateTimeOffset format: d
3.DateTimeOffset format: Y or yDateTimeOffset format: Y or y
4.DateTimeOffset format: ddDateTimeOffset format: dd
5.DateTimeOffset format: ddddDateTimeOffset format: dddd
6.DateTimeOffset format: dddd and CultureInfo("fr-fr")DateTimeOffset format: dddd and CultureInfo(
7.DateTimeOffset format: mDateTimeOffset format: m
8.DateTimeOffset format: mm (2)DateTimeOffset format: mm (2)
9.DateTimeOffset format: M (3)DateTimeOffset format: M (3)
10.DateTimeOffset format: MMDateTimeOffset format: MM
11.DateTimeOffset format: t
12.DateTimeOffset format: T (2)
13.DateTimeOffset format: f
14.DateTimeOffset format: F (2)
15.DateTimeOffset format: g
16.DateTimeOffset format: G (2)
17.DateTimeOffset format: R
18.DateTimeOffset format: s
19.DateTimeOffset format: u
20.DateTimeOffset format: Y
21.DateTimeOffset format: y (2)
22.DateTimeOffset format: yy
23.DateTimeOffset format: yyyy
24.Converts string to DateTimeOffset using the specified format and culture-specific format information.Converts string to DateTimeOffset using the specified format and culture-specific format information.
25.Converts string to DateTimeOffset using the specified format, culture-specific format information, and style.Converts string to DateTimeOffset using the specified format, culture-specific format information, and style.
26.Converts string to DateTimeOffset using the specified formats, culture-specific format information, and style.Converts string to DateTimeOffset using the specified formats, culture-specific format information, and style.
27.Converts DateTimeOffset to string using the specified culture-specific formatting information.
28.Convert DateTimeOffset to string with different culture information
29.Converts DateTimeOffset to string using the specified format.
30.Converts DateTimeOffset to string using the specified format and culture-specific format information.
31.DateTimeOffset format: MMM d, yyyyDateTimeOffset format: MMM d, yyyy
32.Output date using each standard date/time format specifier
33.Output date and time using custom format specification