X509Certificate.FormatDate(DateTime) 方法

定义

将指定的日期和时间转换为字符串。

protected:
 static System::String ^ FormatDate(DateTime date);
protected static string FormatDate (DateTime date);
static member FormatDate : DateTime -> string
Protected Shared Function FormatDate (date As DateTime) As String

参数

date
DateTime

要转换的日期和时间。

返回

String

DateTime 对象的值的字符串表示形式。

注解

某些区域性无法将将来的日期转换为字符串。 如果 X.509 证书的到期日期超出区域性范围, FormatDate 请回退到可以表示日期的日历。 如果值为CalendarUmAlQuraCalendar,则日历将HijriCalendar更改为类;否则,将更改为该InvariantCulture类。

适用于