pretty simple. You can use the DateTime class to get your current time:
DateTime.Now
so when they log in and authentication is successful, check the current time and if its between your values (9 am and 5pm) then cool - continue. So maybe something like:
if (successfulAuthentication)
{
if (DateTime.Now.Hour >= 9 && DateTime.Now.Hour <= 17)
{
//... they can continue
}
}
this is in C#
does this help
|