Time comparison asp

robrodp
robrodp used Ask the Experts™
on
I send some emails but I want them to be sent before midnight  stop and restart at 8:00 AM

Like

if time<="24:00" and time >="08:00" then
send email
end if

What is the correct asp coe t do this?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software Team Lead
Commented:
try use FormatDateTime function, like:

myTime = FormatDateTime(now(),4)
if myTime <="24:00" and myTime >="08:00" then
    'send email
end if

Open in new window


FormatDateTime Function
https://msdn.microsoft.com/en-us/library/aa443991(v=vs.60).aspx

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial