2
Reply

Perform function on Datetime Picker

mike Delvotti

mike Delvotti

Nov 21 2012 11:22 AM
2.3k
What would be the best method to perform a function based on the value of a datetime picker?

For instance I want to set a time value on datetimepicker1 and when the time today matches the datetime picker the function runs.

I imagine running a timer service to check every few seconds using a line something like below:

if(datetime.now("HH:mm")==datetimepicker.value)
{
    Run function here
}

Can it be done?

Answers (2)