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:
dateTimePicker.preferredDatePickerStyle = .compact
dateTimePicker.datePickerMode = .dateAndTime