title: How to take the Calendar date and time as String?
body: <p>I added calendar in my app, it shows the months along with the time. Through this i can select the date and time , but i have no idea how to take this date and time as a string and use it in my code. This i my code:</p>
  <pre><code> dateTimePicker.preferredDatePickerStyle = .compact
   dateTimePicker.datePickerMode = .dateAndTime
  </code></pre>
  <p>Here is an Image of the calendar from my app:
  <a href="https://i.stack.imgur.com/hLxlr.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hLxlr.jpg" alt="enter image description here" /></a></p>