title: How to convert varchar with timezone to datetime in sql
body: <p>I serialize my c# object to xml, then got varchar such as '2009-05-09T13:50:59.6361485+08:00'. </p>
  
  <p>But SQL Server return following messgae: 'Result: Msg 241: Conversion failed when converting date and/or time -- from character string.'</p>
  
  <p>after I execute following sql:
  declare @msg xml</p>
  
  <p>set @msg='&lt;root&gt;&lt;date&gt;2009-05-09T13:50:59.6361485+08:00&lt;/date&gt;&lt;/root&gt;'</p>
  
  <p>select @msg.value(N'(//root/date/text())[1]','datetime')</p>