title: SwiftUI how to bind DatePicker with a variable of type 'TimeStamp'?
body: <p>I am trying to Bind <strong><code>UIDatePicker</code></strong> with a variable that is coming straight from Server but the issue is variable has a type of <strong>TimeStamp</strong> and <strong><code>UIDatePicker</code></strong> requires a type of <strong>Date</strong>.</p>
  
  <pre><code>if(self.shouldShowDatePicker)
  {
      DatePicker(selection:self.$taskData.fields[index].dateField.valueTime , displayedComponents: .date)
      Text("DatePicker")
  }
  </code></pre>
  
  <p>Now I know that this variable <code>self.$taskData.fields[index].dateField.valueTime</code> is of <strong>TimeStamp</strong> type, and since you can see that this variable belongs to a very complex array of fields so I cannot alter the structure. Please let me know what is the possible solution. Thanks</p>