Discount code validity based on customer's signing up date

Is there a way to put a validity to a discount code?

Basically, I will reward customers who sign up with a welcome offer code. My intent is for them to redeem and use it within 7 days of signing up.

There’s an option to set an end date but this is in general. I want it based on the customer’s signing-up date.

Thank you in advance.

Tried consulting the Shopify expert for the same?