Liquibase RollbackDare - unparseable date error

Hello,

I am trying to use liquibase maven plugin to rollback my database to a specific date.
I am using following command:
mvn clean install -Denv=dev -Dgoal=rollback -Drollbackdate=‘2021-05-20 07:15:22’ -Dusername=svcSQLLiquibase -Dpassword=*******

but it gives me this error:
Error parsing rollbackDate: Unparseable date: “2021-05-20 07:15:22”
[ERROR] Date must match pattern: MMM d, y

i have t ried following formats:
20-MAY-2021
2021-05-20

what format should i be using?

Hi @Pooja

Try providing the date in format YYYY-MM-DD'T'HH:MM:SS
So in your case it should be 2021-05-20T07:15:22.

Please give this a try and let us know if it works.

Thanks!
Rakhi Agrawal

no it did not work either
ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.3.5:rollback (WEB_DB_RESET) on project liquibase: Error setting up or running Liquibase: Error parsing rollbackDate: Unparseable date: “2021-05-20T07:15:22”
[ERROR] Date must match pattern: MMM d, y

Hello,

The date format in liquibase is YYYY-MM-DD HH:MM:SS or YYYY-MM-DD'T'HH:MM:SS , however, it is possible to indicate the date or time only.

regards,
Ahmed.