title: Store IN parameter in variable of Stored procedure
body: <p>I am creating a Stored procedure in which ,</p>
  
  <p>I am passing 2 IN parameters as 'year' &amp; 'month' to a procedure,</p>
  
  <p>then " I need to store these both IN parameters in one variable in date_format like ('YYYY-MM-DD')."</p>
  
  <p>And after that I want to use that variable with that Date_Format. </p>
  
  <p>I will try to explain above things in stored procedures format</p>
  
  <pre><code>CREATE PROCEDURE build_table(IN years CHAR(5) ,IN months CHAR(4))
  BEGIN
  DECLARE format1 date ;
  
  # Now i want to store both IN parameters in 'format1' variable and then format1 should be in format 'YYYY-MM-DD' 
  </code></pre>
  
  <p>Can I do this in stored procedure?</p>
  
  <p>If yes give me some guidance.</p>