Version

DateTimeFormatType Enumeration

Specifies how to format a specific date
Syntax
'Declaration
 
Public Enum DateTimeFormatType 
   Inherits System.Enum
public enum DateTimeFormatType : System.Enum 
Members
MemberDescription
DayOfMonthNumberThe day of the month string e.g. '1'thru '31'.
DayOfWeekThe full day of the week string e.g. 'Tuesday', 'Wednesday' etc.
FullDateTimeUses the full date time pattern to format the date and time, e.g. 'Thursday, July 22, 2010 4:31:00 PM'
HourThe hour of the day string e.g. '1' thru '12' or '0' thru '23'.
LongDateUses the long date pattern to format the date, e.g. 'Sunday, July 25, 2010'
LongTimeUses the long time pattern to format the date, e.g. '4:31:00 PM'
MinuteThe minute of the hour string e.g. '0' thru '59',
MonthDayThe month and the day e.g. August 25.
MonthNameThe full name of the month e.g. 'December'.
MonthOfYearNumberThe month of the year string e.g. '1' thru '12'.
NoneReturn an empty string
ShortDateUses the short date pattern to format the date, e.g. '7/22/2010'
ShortDayOfWeekAn abbreviated day of the week string e.g. 'Tue', 'Wed' etc.
ShortestDayOfWeekThe shorted day of the week string e.g. 'Tu', 'We' etc. Note: in Silverlight this is the same as 'ShortDayOfWeek'
ShortestMonthDayThe month and the day e.g. 8/25.
ShortMonthDayThe month and the day e.g. Aug 25.
ShortTimeUses the short time pattern to format the date, e.g. '4:31 PM'
Year2DigitThe year with 2 digits e.g. 2010 as '10'.
Year4DigitThe year with 4 digits e.g. '2010'.
YearMonthThe year and the month e.g. 'July, 2010'.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also