title: How to add 1 day to current date and have result in format yyyymmdd in SQL Server?
body: <p>I need to add 1 day to the current date and have the output in the format yyyymmdd.
  The code needs to be written on a stored procedure on the sql server.</p>
  
  <p>currently my code is as follows:</p>
  
  <pre><code> DECLARE @dat DATE
  
      select @dat = dateadd(DD, 1, getdate())
      SELECT @dat =LEFT(CONVERT(VARCHAR(8), @dat, 112),10) 
  </code></pre>
  
  <p>However, it seems like im doing something wrong as my output on the sql table is in the format yyyy-mm-dd. I need to get rid of the hyphens.</p>
  
  <p>any suggestions guys? thanks in advance.</p>