Message 1 of 3
Adding leading zero tp inches

Not applicable
08-12-2016
12:53 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi guys,
I'm trying to format dimensions to have a leading zero in front of the inches. This is the code I have so far.
Dim DecimalDimension_W As Decimal = WIDTH Dim feet_W As Integer = Floor(DecimalDimension_W)\ 12 Dim inches_W As String = RoundToFraction((DecimalDimension_W - (feet_W * 12)), 1/16, RoundingMethod.Round) If (feet_W >= 1) Then Part_Width = String.Format("{0}'-{1}""", feet_W, inches_W) Else inches_WNofeet_W = RoundToFraction((DecimalDimension_W), 1/16, RoundingMethod.Round) Part_Width = String.Format("{0}""", inches_WNofeet_W) End If
Any suggestions?