def datetimefilter(value, format='%Y-%m-%d'):
    """Simple Jinja2 filter to convert datetime values to the desired format

    Arguments:
        value {datetime.datetime} -- The datetime value

    Keyword Arguments:
        format {str} -- The datetime format string (default: {'%Y-%m-%d'})

    Returns:
        str -- The datetime formatted according to the provided format string.
    """

    return value.strftime(format)