I am sending a JSON PUT request to Grails. In the JSON object, I have a date string. I have searched and experimented, but I cannot determine the default date string format that GORM wants to parse the date string. In all my attempts I get the following error:
java.lang.IllegalArgumentException: Could not parse date: Unparseable date
I just want to know the default format GORM expects and I will happily format the date string in that format before sending it to the server.
I suppose you face this issue during data binding.
Reason:
Default date format for binding is yyyy-MM-dd HH:mm:ss.S
Solution:
The default data format can be changed using PropertyEditorRegistrar. Follow this for details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With