<p>How do I convert a string to DateTime format? For example, if I had a string like:</p>

<p><code>"24/10/2008"</code></p>

<p>How do I get that into DateTime format ?</p>

Use
DateTime.ParseExact
:
```
```
string str = "24/10/2008";
DateTime dt = DateTime.ParseExact(str, "dd/MM/yyyy", 
                                  Thread.CurrentThread.CurrentCulture);
```
```
(You should consider what culture you actually want to parse it in, admittedly.)
EDIT: Other answers have specified "null" as the third parameter - this is equivalent to using
```
Thread.CurrentThread.CurrentCulture
```
.
For other formats, see
"Custom Date and Time Format Strings"
in MSDN.