swift convert date to string code example
Example 1: conert data to string swift
let str = String(decoding: data, as: UTF8.self)
Example 2: swift date to string
let today = Date()
let formatter1 = DateFormatter()
formatter1.dateStyle = .short
print(formatter1.string(from: today))