[Solved] how to convert string to date or date to string [closed]


Resum_Controls_Data_txt is type of String not Date, so you have to convert date to string using DateFormatter as follow:

let formatter = DateFormatter()
formatter.locale = Locale(identifier: "en_US_POSIX")
formatter.dateFormat = "HH:mm E, d MMM y" //add date format whichever you want
cell.Resum_Controls_Data_txt.text = formatter.string(from: control.data)

2

solved how to convert string to date or date to string [closed]