logic statements that responsed to time

M

M. Cade Smith

I am trying to model a response that will only occur if certain parameters
are met. The model considers parameters on 4 h intervals. I have done this
successfully.

However, I want to limit the response to turn on at 20:00 and turn off at
8:00 the following day.

I tried to accomplish this by comparing the difference between two time
intervals to the desired “on†time. When this value is a whole number then
the model turns on.

I wrote the IF function as follow:

IF(T1-Tz=ROUND(T1-Tz),â€onâ€,â€offâ€)

Since T1 remains a constant date at 20:00, if the difference between T1-Tz
is a whole number then the model is at a time where the response is allowed
(if the other parameters are met, throught a different logic statement).

The problem is that the logic statement will not return a true value even if
the statement is true.

Any suggestions?
 
B

Bob Phillips

Firstly, ROUND(T1-Tz) is invalid, it needs another argument.

Secondly, rounding the time to 0 places will return 0 or 1, whereas the
subtracted time will be something fractional number, unless they are exactly
equal.

Other than that, I am not clear what constitutes on.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top