Hello
First of all, I'm sorry if I don't describe my problem so well, English is not my first language.
I'm working on a project where after the user has pressed a button, the button goes invisible and a label control should say "In 20 minutes you may press the button again". The problem is that if the user presses the button before the current hour is almost over, then he will be able to press the button again. The way I compare the time is by placing the current time, which the user presses the button in a sqldatabase table row for that user.
This is my code for the moment for showing the user how long he has to wait:
DateTime TimeSincePressedbutton = Convert.ToDateTime(user.timeSincePressedButton); //value from database
TimeSincePressedbutton.AddMinutes(20.00);
TimeSpan ...
Go to the complete details ...