Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Intermediate
Aug 7, 1997

Round and Format the Easy Way

Do you sometimes need to format rounded numbers to a specific number of digits? You can accomplish this in one step:
 
n = 12.345
Format(n, "0.00\0")
'returns   "12.350"
Format(n, "0.\0\0")
'returns        "12.00"
Format(0.55, "#.0\0") 'returns   ".60"
Peter Gabor
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date