Skip to content

Instantly share code, notes, and snippets.

@ngerakines
Created August 6, 2008 18:34
Show Gist options
  • Save ngerakines/4247 to your computer and use it in GitHub Desktop.
Save ngerakines/4247 to your computer and use it in GitHub Desktop.
Str = "2008-10-01 10:00:01",
[YY, MM, DD, Hh, Mm, Ss] = [list_to_integer(X) || X <- string:tokens(Str, " -:")],
{{YY, MM, DD}, {Hh, Mm, Ss}}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment