Microsoft
Software
Hardware
Network
Question : Converting an Access Date/Time column's value to a DateTime object
My program is throginw an exception on this line:
DateTime time = reader.GetDateTime(date_ti
me_sentInd
ex);
But I do not understand why? It's a C# program trying to read that value from an Access database.
Here's the exception:
Specified cast is not valid. line:606 stracktrace: at System.Data.OleDb.ColumnBi
nding.Valu
eDateTime(
)
I have verified the column number is valid, and do not know what I'm doing wrong.
Could someone please help?
newbieweb
Answer : Converting an Access Date/Time column's value to a DateTime object
Try
DateTime time = Convert.ToDateTime(reader.
GetDateTim
e(date_tim
e_sentInde
x));
HTH
Ashok
Random Solutions
I need access to automatically add a modifier to a cpt code listed in an excel spreadsheet if a certain cpt code is entered on the same line
Need help on sorting a gridview
Retrieve an email ID from Outlook when creating an email from Access
Downloading Freezes
how to write the syntax
How many sort arguments can I use ?
multiple parameters in MS Access 2003
Get the file size of an image in a picturebox
I can not find the record I added to table via search via query
Can SQL query using multiple LIKE joins be improved