I want an event to occur at the same time every day, or every week. My
approach would be to use a timer and check cstr(now) every minute until the
desired time appears. I'm not sure how to determine the day of the week,
though. If I wanted to do the event every Thursday at 11:00 PM, for example,
I'm not sure how I would know that it is Thursday. Is there a better way to
do this, like maybe an API function or something?

Signature
Justin
Gaurav - http://www.gauravcreations.com - 29 Aug 2004 17:31 GMT
you can use the datepart function to find out the specfic day ..it will
return an integer vaule corresponding to the day of the week for e.g 5 for
thursday
you can then compare that with wat the user has specified as the day
and...exceute
Text1.Text = DatePart("w", Now)
> I want an event to occur at the same time every day, or every week. My
> approach would be to use a timer and check cstr(now) every minute until the
> desired time appears. I'm not sure how to determine the day of the week,
> though. If I wanted to do the event every Thursday at 11:00 PM, for example,
> I'm not sure how I would know that it is Thursday. Is there a better way to
> do this, like maybe an API function or something?
Jezebel - 29 Aug 2004 23:23 GMT
A simpler alternative is to use the Windows Scheduler and tell it to run
your app at 11pm every Thursday. Much less drain on resources.
> I want an event to occur at the same time every day, or every week. My
> approach would be to use a timer and check cstr(now) every minute until the
> desired time appears. I'm not sure how to determine the day of the week,
> though. If I wanted to do the event every Thursday at 11:00 PM, for example,
> I'm not sure how I would know that it is Thursday. Is there a better way to
> do this, like maybe an API function or something?