title: How can I convert datetimeoffset to a datetime in SQL Server 2008?
body: <p>I have tried this one, but getting wrong output!</p>
  
  <pre><code>declare @createdon datetimeoffset
  set @createdon = '2017-09-16 05:50:56.0000000 +05:30'
  
  select 
      convert(datetime2, @createdon, 1)
  
  select 
      convert(datetimeoffset, convert(datetime2, @createdon, 1))
  </code></pre>