Jinja IF/Else with some math
I have a pipeline snippet below that functions as require, however, I have two issue that I cannot get past.
The duration code below stems from an actual duration field between two dates plus days(1) to capture first and last day.
The snippet is part of a larger Outlook channel HTML email
/// SNIPPET ///
{# Duration between 2 dates #}
{% if a.duration>0 %}
Duration: {{a.duration}} Day(s)
{% else %}
{% endif %}
/// RESULTS ///
Duration: 86400000 Day(s)
/// Issue #1 ///
No matter what I try, I cannot deduce the milliseconds to actual days. Dividing my duration by 86400000 should give me 1 Day, I simply cannot get the jinja code correctly update to achieve this result.
/// Issue #2 ///
The snippet provides a line feed or break regardless if the statement is true or false.
------------------------------
Thank you so much,
v/r,
Chuck
------------------------------