以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助] GetValues 函数用法 报错  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=66614)

--  作者:sjx71
--  发布时间:2015/4/10 14:58:00
--  [求助] GetValues 函数用法 报错

我在AfterOpenProject 事件中写了以下两句话,

 

Dim tjrqs As List(Of Date)
tjrqs = DataTables("资金占用").GetValues("统计日期")

 

(其中资金占用表中统计日期为日期时间型数据)

 

执行时报错

无法将类型为“System.Collections.Generic.List`1[System.String]”的对象强制转换为类型“System.Collections.Generic.List`1[System.DateTime]”。

 

这句话应该怎么写

 

谢谢各位老师


--  作者:Bin
--  发布时间:2015/4/10 15:02:00
--  


 

Dim tjrqs As List(Of String)
tjrqs = DataTables("资金占用").GetValues("统计日期")


--  作者:sjx71
--  发布时间:2015/4/10 15:07:00
--  

可以了 谢谢Bin老师