// date & time styles format example
myDateFormat.dateStyle = .long
myDateFormat.timeStyle = .short
print(myDateFormat.string(from: now))
// September 3, 2019 at 2:29 PM

// date & time styles format example
myDateFormat.dateStyle = .medium
myDateFormat.timeStyle = .none
print(myDateFormat.string(from: now))
// Sep 3, 2019