Functions.CToDt 方法 | |
Convert a Date string to DateTime.
命名空间:
XSharp.Core
程序集:
XSharp.Core (在 XSharp.Core.dll 中) 版本:2.22 GA
语法 FUNCTION CToDt(
cDate AS STRING,
cDateFormat AS STRING
) AS DateTime
public static DateTime CToDt(
string cDate,
string cDateFormat
)
查看代码参数
- cDate
- 类型:String
A string of numbers representing the month, day, and year, separated by any character other than a number. The month, day, and year digits must be in the format set by SetDateFormat() or SetDateCountry(). If the century digits are not specified, the century is determined by the rules of SetEpoch(). - cDateFormat
- 类型:String
A string representating the date format to use when converting the string to a date. Should consist of D, M and Y characters and separators.
返回值
类型:
DateTimeThe DateTime value that corresponds to the numbers specified in
cDate. If
cDate is not a valid date, CToDt() returns a DateTime.MinValue.
参见