2
I own a field of the kind DateTime?
(void allowed) which is in the full date/hour formed (dd/MM/yyyy hh:mm:ss).
I need to display the date and time in separate columns in a datagridview. I tried to use the DbFunctions.TruncateTime(x.Data.Value.Date)
as I saw in suggestions from here, but gives the following error:
System.Notsupportedexception: 'The specified type Member 'Date' is not supported in LINQ to Entities. Only initializers, Entity Members, and Entity navigation properties are supported.'
dataGridView
is winforms ?– Rovann Linhalis
I think the problem is only in the display... no need to mess with the data... puts the code of how you are loading / displaying this that will help solve
– Rovann Linhalis
@Rovannlinhalis I was editing the question and I realized this too. If so, signal me to delete the answer, please.
– Jéf Bueno
@Rovannlinhalis, yeah. winforms. Thanks for your help, guys.
– Leandro
put the code you populate to datagridview then, and if you generate the columns by visual tool or via code
– Rovann Linhalis