title: To add hh/mm/ss to date in sql
body: <p>In the below query i want to add hh/mm/ss in date.I want to add 00:00:00 and 23:59:59 to my date .pls help me to do this.</p>
  
  <pre><code>@i_StartDate VARCHAR(50)
  
      SELECT Distinct p.ProductID,  
         p.ProductName,  
         ISNULL((SELECT top 1 ISNULL( CurrentStock,0.00)   
          FROM   Productstatus PS  
          WHERE  PS.ProductID =p.ProductID  
                 AND PS.LocationID = 1  
                 AND  PS.StatusDateTime&gt;= @i_StartDate+'00:00:00' AND  PS.StatusDateTime&lt;= @i_StartDate+'23:59:59'
                 and PS.productid=p.productid),0) OpeningStockQuantity
       from Product p
  </code></pre>