title: Making new column based on date with variable year
body: <p>As topic is saying, it all should apply to dates with variable year.</p>
  
  <p>I would like to make a new column (called which_part for example) saying if the date (in this case date is in "<em>sil.sales_invoice_date</em>") is between 1st of january to 30th of june - which should say H1 (half 1) and else is H2 (between 1st of july to end of the year).</p>
  
  <p>I've tried doing something like that with <em>convert</em></p>
  
  <pre><code>SELECT
  sil.sales_invoice_date AS "Distributor Invoice Date",
  CONVERT(sil.sales_invoice_date, @year + '-01-01') AS [start year],
  CONVERT(sil.sales_invoice_date, @year + '-06-30') AS [end year],
  </code></pre>
  
  <p>It doesn't work at all and I can't write <em>[half year]</em> in there.</p>
  
  <p>I've also tried to do it by using</p>
  
  <pre><code>case sil.sales_invoice_date between 
  </code></pre>
  
  <p>But I don't really know how to format it to work with variable year.</p>