i need to send message to user in time diff

hi there ,
i am connectiong to sms web service
i have appointments and i need to remind  the coustomer abhot his appointments 1 hour befor the
appointments time.

i have 3 parameters :
the Appo time
the Appo time -1 hour
and the time itself

if the appo time is : 12:00
i need to send the reminde message in 11:00
how can i do it ?

thanks ...
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Send Reminder message to user if it returns true

private bool SendReminder(DateTime dtAppointmentTime)
   return true;
 return false;

Tech_MenAuthor Commented:
i need to a loop that work all the time
i want to turn the loop every 10 min
and all the app in the range need to get the remind

for exsample :
if there is a cust that has an appo in 12:00
he need to get remind in 11
if the loop start in 11:10 i need to get all the app in the range of 12 -1 houre
Loop is not what you need. You should use timer object. If you set the interval of timer to 60000 which means every minute, you wont miss any reminder.
Add a timer to your form, set it interval to 60000 (Every minute). Add this code the the Tick event of  timer
//Get all appointments from DB
//I assume your query returns a datatable that contains a column name AppointmentTime

           DataTable dt=GetAllAppointments();

            foreach (DataRow drow in dt.Rows)
                DateTime dtAppointmentTime = (DateTime)drow["AppointmentTime"];
                if (DateTime.Now.AddHours(1) == dtAppointmentTime)
                    //Send reminder


Actually you didnt supply enough information. If you have any code, send it to here and clarify what should be done

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.