Assuming you know how to do authorization in general and your problem is only the timing, here is the answer: use the type
System.DateTime
. You can get current time using the static method
System.DateTime.Now
or
System.DateTime.UtcNow
(which is good when your application serves multiple time zones). For comparison, simply use operators "==", "!=", "<", ">", "<=" and ">=". That should be enough for all your purposes.
See
http://msdn.microsoft.com/en-us/library/system.datetime.aspx[
^].
—SA