I need call hora in my code in line convert(% ? ,date)

SELECT tabSales Invoice.posting_date,tabSales Invoice.due_date,allocated_amount,tabSales Invoice.name,tabSales Invoice.status,vendedor,
customer,tabSales Invoice Item.item_code,tabSales Invoice Item.item_name,tabSales Invoice.outstanding_amount,amount,
tabSales Invoice.due_date-(CONVERT(%s, DATE)) as tiempo
FROM tabSales Invoice
INNER JOIN tabSales Invoice Item
ON tabSales Invoice Item.parent = tabSales Invoice.name
LEFT JOIN tabPayment Entry Reference ON tabPayment Entry Reference.reference_name=tabSales Invoice.name
where qty>0 %s
order by tabSales Invoice.name"“” %
>>>hora ,conditions, filters, as_dict=1)

You can convert the value in python and then pass to the mysql query.