Displaying fixed digits = 7 -> 007

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Jun 2005
Posts: 69
Reputation: DotNetUser is an unknown quantity at this point 
Solved Threads: 0
DotNetUser DotNetUser is offline Offline
Junior Poster in Training

Displaying fixed digits = 7 -> 007

 
0
  #1
Feb 27th, 2006
I want to format the number to display fixed digits, but the format code that I have seen doesn't have that option. I want to display the longitude of the cursor in DDD::MM:S form. I want to see 7 degrees as 007::00::00.

My code in VC++.NET (formatting is not included):
statusBarPanelLon->Text = String::Concat (degrees.ToString(), S"::" , minutes.ToString(), S"::", rndSecs.ToString());

My code will display 7 degrees as 7::0::0. I was hoping there is something available in .net to use so I won't have to manually concat zeros.

Thanks.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC