Skip to content

Instantly share code, notes, and snippets.

@giuliohome
Created August 26, 2019 20:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save giuliohome/9a8f856c418410424a1ca04ca6dfa062 to your computer and use it in GitHub Desktop.
Save giuliohome/9a8f856c418410424a1ca04ca6dfa062 to your computer and use it in GitHub Desktop.
// from IE datepicker to F#: you tried Globalization, ParseExact, etc... without luck
// and this does the trick ;-)
let filterDate (str:string) : string =
new string (str.ToCharArray()
|> Array.filter(fun c -> int c < 128))
// used for example in
let dateFrom = DateTime.Parse(filterDate dateFromStr)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment