Post

Replies

Boosts

Views

Activity

Comment on Using NSSortDescriptor(key: "date", ascending: true
Hi DMG, I have been without any luck to get this to sort correctly, so I changed the ascending to false and that works, but of course I can't find how to change the attribute 'date' from a string. I changed it in Attributes to a Date but of course many errors pop up ( Cannot assign value of type 'Date?' to type 'String?') I read somewhere but cannot find it on how to convert a 'date' String to use for sorting? Any thoughts on where to find an article I can read. Thanks for any help. Drew
Topic: App & System Services SubTopic: iCloud Tags:
Mar ’22
Comment on Using NSSortDescriptor(key: "date", ascending: true
Hi Michaela, It is sorted by the highest (first)day number. They sorted like below: Mar 9, 2022 Mar 8,2022 Mar 7, 2021 Mar 6,2022 Mar 5, 2022 Mar 4, 2022 Mar 3, 2022 Mar 26, 2022 Mar 26,2021 Mar 23, 2022 Mar 11, 2022 etc... I did not know where to put the 'public' on the var realDate, so I left it out. maybe that is the issue? Thanks again, Drew
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
Mar ’22
Comment on Using NSSortDescriptor(key: "date", ascending: true
Hi DMG, I have been without any luck to get this to sort correctly, so I changed the ascending to false and that works, but of course I can't find how to change the attribute 'date' from a string. I changed it in Attributes to a Date but of course many errors pop up ( Cannot assign value of type 'Date?' to type 'String?') I read somewhere but cannot find it on how to convert a 'date' String to use for sorting? Any thoughts on where to find an article I can read. Thanks for any help. Drew
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
Mar ’22