Hello I have a timestamp that is currently structured as a string as so "December 18, 2022 at 5:34:06 PM UTC" I am trying to get the day out of this String and structure it to a Date formate. I want to do this so I can use the Calendar.current.isDateInYesterday() function. When I try this as so
Calendar.current.isDateInYesterday(timestamp.formatted(.dateTime.day()))
I get the error "Cannot convert value of type 'Date.FormatStyle.FormatOutput' (aka 'String') to expected argument type 'Date'"
I think I cant plug in a String into this function but rather an argument with date structure. Can anyone help