If I want to assign the current time to a variable, how do I do it? I 
have tried this 

myhours=TimeNum();


However, I will get either a value of 0 or I get 142059. I don't 
understand why I would get two different values especially when both 
of them are wrong. 

Also,when I use this if statement, I get the value for mytime as 800 
which then assigns Conditon201 a value of 100.

mytime= IIf (myhours >=153000 AND myhours <=163100,200,100);

if (mytime =800 )

    Condition201=200;
else 
{
     Condition201=100;
}

If I change it to this,

mytime= IIf (myhours >=153000 AND myhours <=163100,2300,100);
if (mytime =200 )

    Condition201=200;
else 
{
     Condition201=100;
}

it then assigns Condition201 a value of 200 even when the time is not 
correct and mytime should be 100. It seems that mytime is assigned 
the value in the if statement. 

What am I doing wrong?

Thanks,
Tom





Reply via email to