How to get a datetime for Dataview

  • Thread starter Thread starter ad
  • Start date Start date
A

ad

I have a DataView, say myDV, it contain a DataTime field, "Birth".
I want to get the Birth Value from the DataView:

DateTiem dBirth= (DateTime)myDV["Birth"];

But the complier throw an error.

How can I get datetime for Dataview?
 
I have a DataView, say myDV, it contain a DataTime field, "Birth".
I want to get the Birth Value from the DataView:

DateTiem dBirth= (DateTime)myDV["Birth"];

Try spelling "DateTime" correctly...
 
In addition to spelling 'DateTime' correctly in the declaration, you didn't
specify which row in the dataview you want. You have to index into it by
row, then by column. Otherwise if you have 10 rows, which 'Birth' value do
you expect to get?
 
I wish I were more like Mark and never had a typo!

Mark Rae said:
I have a DataView, say myDV, it contain a DataTime field, "Birth".
I want to get the Birth Value from the DataView:

DateTiem dBirth= (DateTime)myDV["Birth"];

Try spelling "DateTime" correctly...
 
Back
Top