How do I set the correct date format using moment in strapi v4

I was able to solve the issue.

The issue was that I wasn’t setting the correct format strapi wanted which is the YYYY-MM-DD format. I was able to set the expiration date to 7 days in the future using moment.

Snippet below.

image