Announcement

Collapse
No announcement yet.

evaluating time

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • evaluating time

    Good morning,

    Could I tell me EFS study to work only on specific
    periods of time ?

    like form 7:00 am to 12:00 pm and
    from 11:00 pm to 3:00 am ?

    Have a great day,


    Jaime

  • #2
    Jaime
    To do that you need to enclose your code within a time condition such as for example the one shown below.
    Alex

    PHP Code:
    function main(){
     
        var 
    Time = (hour(0)*100)+minute(0);
     
        if( (
    Time >= 700 && Time <= 1200) || Time >= 2300 || Time <= 300){
            
    //execute your code
            
    setBarBgColor(Color.yellow);//this is only to illustrate the example
        
    }
        
        return;

    Comment


    • #3
      Jaime
      Adding to my prior reply. In my example I went with the assumption that in your first time slot you meant 12:00am instead of 12:00pm since you then had a second time slot for 11:00pm to 3:00am
      Let me know if that was not the correct assumption and I can show you how to modify the conditions
      Alex

      Comment

      Working...
      X