Entity 4.0 Casting Value As DateTime

后端 未结 4 1600
南笙
南笙 2021-01-25 14:32

LINQ to Entity Framework 4.0. SQL Server.

I\'m trying to return a list of objects and one of the columns in the database is varchar(255) and contains dates. I\'m tryin

4条回答
  •  灰色年华
    2021-01-25 14:44

    You want DateTime.Parse(c.value) which will take a string containing a date and create a DateTime object out of it.

提交回复
热议问题