IBM Lotus Symphony
|
将任何字符串或数字表达式转换为日期值。
CDate (Expression)
日期
Expression:要转换的任何字符串或数字表达式。
转换字符串表达式时,必须遵循 DateValue 和 TimeValue 函数的约定,以 MM.DD.YYYY HH.MM.SS 的格式输入日期和时间。在数字表达式中,小数点左边的值表示日期(自 1899 年 12 月 31 日起)。小数点右边的值表示时间。
sub ExampleCDate
MsgBox cDate(1000.25) REM 09.26.1902 06:00:00
MsgBox cDate(1001.26) REM 09.27.1902 06:14:24
end sub