title: TSQL update date with today from datetimeoffset column
body: <p>I have a table with 3 columns:
  ID (int, PK)
  Time (datetimeoffset)
  StoredValue (int)</p>
  
  <p>I need to update only the date in the Time column with today, <strong>each row according to the timezone that is already stored in the datetimeoffset</strong> (but dont change the time or timezone info). For example if the stored value is: 2014-10-08 08:25:46.0000000 +04:00 and Today for that timezone is: 2014-10-20, it should become:2014-10-20 08:25:46.0000000 +04:00 but if today is still 2014-10-19 for that timezone, it should be set to: 2014-10-19 08:25:46.0000000 +04:00.</p>
  
  <p>How can I do that in TSQL?</p>
  
  <p>UPDATE:
  Possibly messy and incomplete answer that does not update correctly each row according to the timezone, but based on the answers below:</p>
  
  <pre><code>DECLARE @date DATETIMEOFFSET = SYSDATETIMEOFFSET()
  DECLARE @date2 datetimeoffset(4) = '12-10-25 12:32:10.1237 +01:0'
  CONVERT(DATETIMEOFFSET, DATETIMEOFFSETFROMPARTS(datepart(yyyy, @date), datepart(mm, @date), datepart(dd, @date), datepart(HH, @date2), datepart(MI, @date2), datepart(SS, @date2), datepart( MILLISECOND, @date2), CAST((FLOOR(DATEPART(TZ, @date2)) / 60) AS VARCHAR(10)), CAST((DATEPART(TZ,@date2)%60) AS VARCHAR(10)), 3))
  </code></pre>