RE: [Zope] Question about dtml-var, "null=", and data types
11 Sep
2002
11 Sep
'02
4:21 p.m.
[ Jean-Francois.Doyon]
Thanks for this. The reason I need to do the int() is because the underlying data is float is was getting 123.0 ... And I don't want the decimals to show at all.
Use a format string, like <dtml-var value fmt="%.0f" null="N/A"> Just read up on format strings in the help (really, in the Python manual) to get the format that you want.
Mind you no matter how I do it, I can't seem to get the int() and "null=" functioning properly together.
The above works correctly whether or not there is a null. Cheers, Tom P
8608
Age (days ago)
8608
Last active (days ago)
0 comments
1 participants
participants (1)
-
Passin,Thomas B. (Tom)