__Date.ToString 方法 (String) | |
Converts the value of the current DateTime object to its equivalent string representation using the specified format and the formatting conventions of the current culture.
命名空间:
XSharp
程序集:
XSharp.RT (在 XSharp.RT.dll 中) 版本:2.22 GA
语法 METHOD ToString(
s AS STRING
) AS STRING
public string ToString(
string s
)
查看代码参数
- s
- 类型:String
返回值
类型:
StringA string representation of value of the current
DateTime object as specified by
format.
异常 异常 | 条件 |
---|
FormatException | The length of format is 1, and it is not one of the format specifier characters defined for DateTimeFormatInfo.
-or-
format does not contain a valid custom format pattern. |
ArgumentOutOfRangeException | The date and time is outside the range of dates supported by the calendar used by the current culture. |
参见