I am attempting to retrieve a dollar amount from my database, concatenate it with other information and have it print with 2 decimal points. I have tried so many different configurations I have lost tract but continue to get only one decimal point (or an error). Can someone please show me where I am losing it.
#get payments on the permits
for i in range(len(IDS)):
paydate = date.today() - timedelta(30)
query = '''select `AmountPaid_credit`, `PayComment`, `DateReceived`, `WPTSinvoiceNo`
from Payments
where `NPDES_ID` = ? and `DateReceived` >= ?'''
PayStrings.append("\tNo Payment Recieved")
for row in cur.execute(query, (IDS[i],paydate)):
WPTSInv.append(row[3])
d= row[2].strftime('%m/%d/%Y')
#create a payment string
PayStrings[i]="\t$"+str(row[0])+" - "+d+" - "+row[1]
returns this
$2000.0 - 02/09/2017 - 2017 APPLICATION FEE
but I need this
$2000.00 - 02/09/2017 - 2017 APPLICATION FEE