Hi All The Below代码在Visual Studio 2003中运行正常但在我将解决方案转换为VS2008之后,下面给出了错误。请帮我解决问题
代码:
Dim strToDate As string
strToDate = "2013-02-06"
Dim dateFromSelect, dateToSelect, dateToSelectEnd, dateFromSelectStart As DateTime
dateToSelectEnd = strToDate + "-23:59:59.9999999"
错误
Conversion from string "2013-02-06-23:59:59.9999999" to type 'Date' is not valid
答案 0 :(得分:1)
问题是
dateToSelectEnd = strToDate + "-23:59:59.9999999"
应该是
dateToSelectEnd = strToDate + " 23:59:59.9999999"