System.Security.Cryptography.X509Certificates.X509Certificate.FormatDate Method

Converts the specified date and time to a string.

Syntax

protected static string FormatDate (DateTime date)

Parameters

date
The date and time to convert.

Returns

A string representation of the value of the DateTime object.

Remarks

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

Requirements

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