Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DateTime, DateTime? and LINQ

When I retrieve a record using LINQ that has a DateTime field only the ToString() is available.

Where are all the other DateTime methods?

I have to Convert.ToDateTime the DateTime? that the Field returns?

What is the difference between (DateTime) and (DateTime?)

like image 287
ctrlShiftBryan Avatar asked Oct 04 '08 02:10

ctrlShiftBryan


1 Answers

If by DateTime? you mean a Nullable<DateTime>, then you can get the DateTime value via the DateTime?.Value property.

like image 50
Mark Cidade Avatar answered Oct 23 '22 01:10

Mark Cidade