convert string to System.DateTime in F#

date, f#

Solution

You could do it as simply as this:

let dateTime = System.DateTime.Parse "1-1-2011"

Problem

if I get a string from the command line and it looks like this: ``` '1-1-2011' ``` how can I convert that string to a DateTime object in F#?

Original source

Related problems