Pretty much the only way to do that is by having your app communicate with a server via the internet and validate the licence - and that can get complicated for a beginner, so you are probably better off buying in a solution:
CryptoLicensing For .Net - Add licensing, copy-protection and activation to C# and VB.Net apps, components, controls and ASP.Net web sites.[
^] is one such, but Google will find you many more.
Remember, getting a solid, secure, date based security system in place is complex, and will take a lot of your time. And if you get it wrong, it's worthless, or worse will alienate legitimate users (there is still one large company whose software I will never use again because their security system bolloxed me up so much on an app I'd paid a lot of money for). It's very hard to get a good reputation, and spectacularly easy to lose it ...
Figure out what your time is worth to you, estimate how long it will take to write your own security system, double that, and multiply the two: if that's significantly less than the price of a bought in system then go for it. Otherwise, buy it.