SourceForge has been redesigned. Learn more.
Close

#2 Missing cvtMoney function

open
nobody
None
5
2005-09-06
2005-09-06
Anonymous
No

The cvtMoney function is missing from db.py and will
cause an error when accessing a money column in MS SQL.
I found the function in adodbapi.

def cvtMoney((hi, lo), decimal=2):
TWO32 = 2L ** 32
if lo < 0:
lo += TWO32
return round((float((long(hi) << 32) +
lo))/10000.0,decimal)

Discussion


Log in to post a comment.