Hy!
I’m trying to create a list of days(integer) from a list of dates(date).
I tryed to do this…..
Dim days As New List(Of Integer)
days = From a In DATES
Where a.desc = "ferias"
Select Day(a.date)
But Im getting an error saying that its
not possible to convert an object of type
“WhereSelectListIterar”‘2[dates, System.int32] in
system.collections.generic.list’1[System.int32]
How can I get the integer days of “DATES”, which is a list of Date?
Tks!
First of all, don’t do Dim days As New List(Of Integer) if you intend to overwrite this value. Next, use the ToList() extension method if you want a list instead of an enumerable.