Use a ready-to-use scheme like
CryptoLicensing for this - it supports trial licenses (x days, X unique days, etc), then you can issue them full licenses without any trial limits. It comes with a ready "evaluation info dialog" which can show "X of Y days remaining," and also allow user to enter the full license code.