How to make free trial app

I want to make a free days for my app to be used then user should use it again if he purchase it .
Hou could I do to implementbthus in my project .