Add .00 Or 0 After A Number Follow

0
Avatar
Legacy Poster

Hi I have a data field called "Field: 1.Total Price" that is coming from a database and the database is taking away the .00 or 0 for example if it is 7.00 it is giving me 7 or if it is 7.10 it is giving me 7.1 how can I add it in bartender using a vb script Thank you

2 comments

0
Avatar
Domingo Rodriguez
Moderator
Comment actions Permalink

You can use FormatNumber() or FormatCurrency() methods. They're both described in BarTender's Help for VBScript ("Help > Visual Basic Script Help").

 

An OnProcessData VBScript example would be:

 

value = FormatNumber(value, 2)

0
Avatar
Legacy Poster
Comment actions Permalink

Thanks work great

Please sign in to leave a comment.