title: How to get year of character hijri date SQL Server
body: <p>I searched and tried many examples unable to solve my hijri date is like,</p>
  
  <pre><code>19/07/1440
  </code></pre>
  
  <p>I tried this query</p>
  
  <pre><code> SELECT TOP 200   
       DATEPART(YEAR, EndDateHejri)
   FROM 
       student
  </code></pre>
  
  <p>but I'm getting this error </p>
  
  <blockquote>
    <p>Conversion failed when converting date and/or time from character string</p>
  </blockquote>
  
  <p>I'm unable to solve error - hoping for your suggestions </p>