P粉2376895962023-09-02 00:55:05
Your format string is incorrect.
Please view the documentation for SimpleDateFormat
: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/text/SimpleDateFormat. html
You should use lowercase letters y and lowercase letters d.
I think your conversion should use the following pattern:
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");