My problem is that I need to be able to carry a String which contains the expire date of a Cookie to the class Date then having the expire date in type Date using it to create an object of the class Cookie .
Previously from the class Date I would have been able to achieve it, but this method is currently discarded.
String dateExp = "Fri Jul 08 14:58:01 CEST 2022"; Date date = new Date(dateExp);
And I can't find the current way to be able to carry this String a Date using a Date Format . This is the code I used but it rejects it.
String dateExp = "Fri Jul 08 14:58:01 CEST 2022"; SimpleDateFormat objSDF = new SimpleDateFormat(); Date date = objSDF.parse(dateExp);
Thank you and I look forward to your support.