Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

Converting an Object Value to a datetime?

$
0
0

I have a column in a datagridview that stores datetime values ("MM/dd/yyyy hh:mm:ss") is the format.  I am trying to use the following code to convert the value to a DateTime format.  I get the following error: Cannot convert from 'out System.DateTime' to 'System.IFormatProvider' 

DateTime.Parse(dgvRow.Cells["LOGDATE"].ToString("MM/dd/yyyy HH:mm:ss"), out dCurDate);

I am not sure how to resolve.  I would expect the value to load into the variable called dCurDate.

Any suggestions?  Thanks!


Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>