[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

C# asp.net- datetime conversion

Posted on 2009-02-11
2
Medium Priority
?
1,094 Views
Last Modified: 2012-05-06
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
0
Comment
Question by:CharlieDev
2 Comments
 
LVL 3

Accepted Solution

by:
Blomholm earned 2000 total points
ID: 23609931
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
 

Author Closing Comment

by:CharlieDev
ID: 31545494
thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month17 days, 22 hours left to enroll

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question