Export (0) Print
Expand All

DateTimeFormatInfo.PMDesignator Property

Gets or sets the string designator for hours that are "post meridiem" (after noon).

[Visual Basic]
Public Property PMDesignator As String
[C#]
public string PMDesignator {get; set;}
[C++]
public: __property String* get_PMDesignator();
public: __property void set_PMDesignator(String*);
[JScript]
public function get PMDesignator() : String;
public function set PMDesignator(String);

Property Value

The string designator for hours that are "post meridiem" (after noon). The default for InvariantInfo is "PM".

Exceptions

Exception Type Condition
ArgumentNullException The property is being set to a null reference (Nothing in Visual Basic).
InvalidOperationException The property is being set and the DateTimeFormatInfo is read-only.

Remarks

If the custom pattern includes the format pattern "tt" and the time is after noon, DateTime.ToString displays the value of PMDesignator in place of the "tt" in the format pattern. If the custom pattern includes the format pattern "t", only the first character of PMDesignator is displayed.

For cultures that do not use a PM designator, this property returns an empty string.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

DateTimeFormatInfo Class | DateTimeFormatInfo Members | System.Globalization Namespace | AMDesignator

Show:
© 2014 Microsoft