Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 1.1
.NET Framework
Reference
Class Library
Properties
 AMDesignator Property
This page is specific to
Microsoft Visual Studio 2003/.NET Framework 1.1

Other versions are also available for the following:
.NET Framework Class Library
DateTimeFormatInfo.AMDesignator Property

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

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

Property Value

The string designator for hours that are "ante meridiem" (before noon). The default for InvariantInfo is "AM".

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 before noon, DateTime.ToString displays the value of AMDesignator in place of the "tt" in the format pattern. If the custom pattern includes the format pattern "t", only the first character of AMDesignator is displayed.

For cultures that do not use an AM 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 | PMDesignator

© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker