Clive Portman: code

Return the difference between two dates in Craft CMS (with Twig)

{% set startDate = "April 20, 2015 12:30" %}
{% set difference = date( now | date() ).diff(date(startDate)) %}
{% set leftDays = difference.days %}
{% set leftHours = difference.h %}

{{ leftDays }} days, {{ leftHours }} hours

Source