Export (0) Print
Expand All

X509Certificate.FormatDate Method

Converts the specified date and time to a string.

Namespace:  System.Security.Cryptography.X509Certificates
Assembly:  mscorlib (in mscorlib.dll)

protected static string FormatDate(
	DateTime date


Type: System.DateTime
The date and time to convert.

Return Value

Type: System.String
A string representation of the value of the DateTime object.

Some cultures cannot convert future dates into strings. If the expiration date of an X.509 certificate is beyond the range of the culture, FormatDate falls back to a calendar that can express the date. If the Calendar value is UmAlQuraCalendar, the calendar is changed to the HijriCalendar class; otherwise, it is changed to the InvariantCulture.

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, 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

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

© 2014 Microsoft