Hi,
to format a ecto datetime from the db i use
Timex.format!(datetime, "{D}.{M}.{YYYY} {h24}:{m}")
This works for everything but the minutes. They are always 00. So instead of 25.10.2016 08:28
i get 25.10.2016 08:00
Please help.
thanks
Hi,
to format a ecto datetime from the db i use
Timex.format!(datetime, "{D}.{M}.{YYYY} {h24}:{m}")
This works for everything but the minutes. They are always 00. So instead of 25.10.2016 08:28
i get 25.10.2016 08:00
Please help.
thanks
There is probably something wrong with your date because that format string works correctly,
iex> DateTime.utc_now |> IO.inspect |> Timex.format!("{D}.{M}.{YYYY} {h24}:{m}")
#<DateTime(2016-10-25T11:31:33.983119Z Etc/UTC)>
"25.10.2016 11:31"
Thank you.