let date = Date()
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "dd/MM/yyyy"
let fetchRequest: NSFetchRequest = GroupRecord.fetchRequest()
fetchRequest.predicate = NSPredicate(format: "groupName == %@ ", groupNameItem)
do {
let items = try managedObjectContext.fetch(fetchRequest)
for item in items {
if let dateItem = (item.value(forKey: "date"))
{
print(dateItem)
}
}
}
I have a date attribute with dates. Record was saved, but I cannot get that date displayed in a textView. All I am getting is the current system date.
Any help will be appreciated.