big issue in converting string to datetime using linq-to-entities

前端 未结 4 990
傲寒
傲寒 2020-11-29 10:38

How can I convert the string to datetime using linq to entities ....

I have got the below query, where the visit_date column datatype is string...

4条回答
  •  醉梦人生
    2020-11-29 11:00

    Because DateTime and DateTimeOffset are structs, they are not intrinsically nullable. When you need nullability, there are two ways around this:

    1. Use a Nullable type (i.e., DateTime? or DateTimeOffset?).
    2. Use the static field DateTime.MinValue or DateTimeOffset.MinValue (the default values for these types)

提交回复
热议问题