I am trying to compare current system time to a set time. Please see below:
set currentTime=%TIME%
set flag=false
if %currentTime% geq 07:00 if %currentTime% leq 22:45 set flag=true
if %flag%==true (
) else (
)
If the time is between 7 am and 10:45pm then perform this action otherwise perform the other.
The problem is this doesn't work. The results constantly vary. I think it has to do with my comparison to i.e., 07:00