In my last project I had to parse the date but format was not fixed. I have googled for the same and found that grails 2.x.x added a new method in params using that you can parse the date regardless format. Code looks like :
def date= params.date('myDate', 'dd-MM-yyyy') OR def date=params.date('myDate', ['yyyy-MM-dd', 'yyyyMMdd', 'yyMMdd']) OR //the format read from messages.properties via the key 'date.myDate.format' def date=params.date('myDate')
Note : This method of parsing only works inside a controller.
Hope this will help.