title: convert money to string format in sql using c#
body: <p>I am retrieving results from an SQL table using a query in c# and stuck with <code>format.string</code> while converting the money. I am unable to convert into string format with zeros. where I want PCN Charge as 7 characters (eg 100 as 0010000) and court fee as ( 15 like 01500).</p>
  
  <pre><code>string stringSql = " SELECT distinct  " +
                     " space(1991)," +
                     "'" + comboBox6.Text + "' as RecordType" +
                     " , left([Claimant Address7] +'
                     ',29) as ClaimantAddress7 " +
                     ", space(180)," +
  </code></pre>
  
  <p>THE ERROR is HERE</p>
  
  <pre><code>"(bat.PCN_Charge) *100 ".ToString().PadLeft(7, '0')  + // value output I get is 10000.0000( where PCN CHARGE is 100)
   ",([Court Fee])*100 ".ToString().PadLeft(5, '0') +  // value I get is 1500
  </code></pre>
  
  <p>( where court fee is 15)</p>