开发者

system.LinQ.Iqueryable(of date) cannot be converted to date

开发者 https://www.devze.com 2022-12-08 12:04 出处:网络
I am trying to fetch data using linQ a开发者_JS百科s shown below. dim rerun as datetime Dim q = (From a In dashboard Where a.SucessFlag = 0 And a.ApplicationID = 1 _

I am trying to fetch data using linQ a开发者_JS百科s shown below.

dim rerun as datetime

     Dim q = (From a In dashboard Where a.SucessFlag = 0 And a.ApplicationID = 1 _
                            Select a.logDate)
                rerunDate = q

I am getting this system.LinQ.Iqueryable(of date) cannot be converted to date

Any workaround will be greatly appreciated.


If you expect just one result just use Single or SingleOrDefault to get the date. If you want the first result you can use First or FirstOrDefault.

0

精彩评论

暂无评论...
验证码 换一张
取 消