NaiveDateTime.from_erl-exclamation-mark

You're seeing just the function from_erl-exclamation-mark, go back to NaiveDateTime module for more information.
Link to this function

from_erl!(tuple, microsecond \\ {0, 0}, calendar \\ Calendar.ISO)

View Source

Specs

Converts an Erlang datetime tuple to a NaiveDateTime struct.

Raises if the datetime is invalid. Attempting to convert an invalid ISO calendar date will produce an error tuple.

Examples

iex> NaiveDateTime.from_erl!({{2000, 1, 1}, {13, 30, 15}})
~N[2000-01-01 13:30:15]
iex> NaiveDateTime.from_erl!({{2000, 1, 1}, {13, 30, 15}}, {5000, 3})
~N[2000-01-01 13:30:15.005]
iex> NaiveDateTime.from_erl!({{2000, 13, 1}, {13, 30, 15}})
** (ArgumentError) cannot convert {{2000, 13, 1}, {13, 30, 15}} to naive datetime, reason: :invalid_date