Dear Friends,
There is an error coming with this when i'm trying to read date. Help me to solve this problem.
dateTimePicker1.Value = gettemprecord[14].ToString();
Dear Friends,
There is an error coming with this when i'm trying to read date. Help me to solve this problem.
dateTimePicker1.Value = gettemprecord[14].ToString();
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Scott LyslePosted Jun 2, 2008, 9:14 PM
The value is a DateTime value; it won't accept a string.
For example; this works:
dateTimePicker1.Value =
DateTime.Now.AddDays(-5);But this does not:
dateTimePicker1.Value =
DateTime.Now.AddDays(-5).ToShortDateString();