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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Scott LysleRank #49 · 31K reputationPosted Jun 2, 2008, 5:14 PM EDT
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();