Link to home
Start Free TrialLog in
Avatar of dgelinas
dgelinasFlag for United States of America

asked on

Script to run a function if the time is between two different times of the day

My VB script is terrible and I'm trying to customize a 3rd party app.  I want to run a javascript function if the system time is between two different times of the day.

So, how would I go about saying if the current time (in military time) is greater than 17:30 and less than 8:00.  
Avatar of bramsquad
bramsquad
Flag of United States of America image

       If (Now.ToShortTimeString <= #5:30:00 PM#) And (Now.ToShortTimeString >= #8:30:00 AM#) Then
             'success!!!
             MsgBox("true")
        End If

~b
ASKER CERTIFIED SOLUTION
Avatar of bramsquad
bramsquad
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial