CDate可以将String转换为Date,支持多种输入格式。但是我建议先检查字符串IsDate。
DateSerial 可以通过将年、月、日作为整数来生成日期。
DateSerial与您的示例一起使用:
Dim myDate As Date
myDate = DateSerial(2016, 3, 1)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4284 次 |
| 最近记录: |