Unable to format a date-time variable properly

244 views Asked by At

I'm trying to convert a date-time to a certain format:

Timex.format!(my_date_time, "%a, %d %b %Y %H:%M:%S %z"))

which throws an exception:

 got {:format, "Invalid format string, must contain at least one directive."} 
 while retrieving Exception.message/1 for %Timex.Format.FormatError{message: 
{:format, "Invalid format string, must contain at least one directive."}} (expected a string)
0

There are 0 answers