Converting date string to Ecto.Date

You can also use Elixir’s Date module:

iex(11)> Date.from_iso8601!("2017-02-22")
~D[2017-02-22]

I believe Ecto.Date and DateTime are deprecated as of Ecto 2.1.