Time comparison asp

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


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

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

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software Team Lead
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

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