I have this one line property
Public ReadOnly Property DateToUniversal(ByVal dt As Nullable(Of Date)) As String
Get
Return If(dt.HasValue, dt.Value.ToString("u").Substring(0, 10), "")
End Get
End Property
if i'm trying to use that into a
from n in mydatacontext
select new myObj {n.field1,n.field2, DateToUniversal(n.field3)}
it doesn't work all the time because LINQ2SQL cannot convert that into a sql query.
is there a way to do this?