C# asp.net- datetime conversion

Hi,
I'm trying to set a datetime variable to 0/0/0000, is this a valid datetime?

and if so  whats wrong with my code:

string From = "00//00//00";

DateTime dateFrom = Convert.ToDateTime(From);

Thanks
CharlieDevAsked:
Who is Participating?
 
BlomholmCommented:
Min value of a DateTime is: 01.01.0001

and for creating the dateTime:

DateTime dateFrom = DateTime.Parse("01.01.001");

Open in new window

0
 
CharlieDevAuthor Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.