Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there a way to access the time and use in IF statement
#5
Code:
Copy      Help
;get current date and time
DATE now.getclock
;get time part
int days=now.date; now.date-days
;set variables for times
DATE t9("9:00") t10("10:00") t11("11:00") t12("12:00") ;;and so on
;compare

int x y
if(now>=t9 and now<t10) x=1; y=10
else if(now<t11) x=20; y=30
else if(now<t12) x=30; y=40
;and so on

;run it
rep Uniform(x y)
,out "run program"
,;...
,


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)