Calendar.ISO.naive_datetime_to_string
You're seeing just the function
naive_datetime_to_string
, go back to Calendar.ISO module for more information.
Link to this function
naive_datetime_to_string(year, month, day, hour, minute, second, microsecond, format \\ :extended)
View Source (since 1.4.0)Specs
naive_datetime_to_string( year(), month(), day(), Calendar.hour(), Calendar.minute(), Calendar.second(), Calendar.microsecond(), :basic | :extended ) :: String.t()
Converts the datetime (without time zone) into a string.
By default, returns datetimes formatted in the "extended" format,
for human readability. It also supports the "basic" format
by passing the :basic
option.
Examples
iex> Calendar.ISO.naive_datetime_to_string(2015, 2, 28, 1, 2, 3, {4, 6})
"2015-02-28 01:02:03.000004"
iex> Calendar.ISO.naive_datetime_to_string(2017, 8, 1, 1, 2, 3, {4, 5})
"2017-08-01 01:02:03.00000"
iex> Calendar.ISO.naive_datetime_to_string(2015, 2, 28, 1, 2, 3, {4, 6}, :basic)
"20150228 010203.000004"