title: Calculate the Rates based on the Hour value SQL Server
body: <p>In our application we follow the below pattern to save the hours spent by an employee.</p>
  
  <ul>
  <li>for 30 minutes = 0.30</li>
  <li>for 1 hour     = 1</li>
  </ul>
  
  <p>So if an employee works 1 hour 30 minutes, then the hours value would be <code>1.30.</code></p>
  
  <p>We also calculate the wages for each employee using below formula.</p>
  
  <pre><code>wages = rate * hours  
  </code></pre>
  
  <p>If an employee has an hourly rate of <code>50$</code>, his wages for 1 hour 30 minutes would be <code>75$</code>. But as per our data structure we got </p>
  
  <pre><code>wages = 50 * 1.30 = 65    
  </code></pre>
  
  <p>How can I get the correct wages? </p>
  
  <p>(Note: we were not permitted to change the data structure in the table. i.e to make the 1 hour 30 minutes as 1.50)</p>
  
  <p>Thanks for the help</p>