Ash FrameworkAF
Ash Framework7mo ago
6 replies
Vahagn

datetime_add shows error Could not cast function arguments for datetime_add/3

   calculate :ends_at, :datetime, expr(datetime_add(starts_at, minutes, :minutes))

I couldn't find any examples of datetime_add and assumed it should work in expr.

I was using :naive_datetime at first, and I thought the error was because of that, and changed starts_at attribute to datetime, but it did not work
Solution
:minute instead of :minutes
Was this page helpful?