View previous topic :: View next topic |
Author |
Message |
offshore Beginner
Joined: 11 Dec 2003 Posts: 8 Topics: 6
|
Posted: Wed Sep 15, 2004 2:08 pm Post subject: REXX TIME() |
|
|
All,
What is the best way to compare on system time?
For example:
IF TIME() <= 18:00 THEN
SAY 'BEFORE 6PM'
ELSE
SAY 'AFTER 6PM'
What is the best way to get 18:00 into a numeric compare instead of a character compare?
Then actually, just to throw a wrench in the work I would really like to do a compare between certain times.
IF TIME() betwen 18:00 and 06:00 THEN.......
Any help would be appreciated.
Thanks ,
Offshore |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Wed Sep 15, 2004 2:35 pm Post subject: |
|
|
Offshore,
Try one of these methods.
Code: |
/* REXX */
TIMENOW=TIME(H)
IF TIMENOW < 18 THEN
SAY 'BEFORE 6PM'
ELSE
SAY 'AFTER 6PM'
|
or
Code: |
/* REXX */
TIMENOW=SUBSTR(TIME('L'),1,5)
IF TIMENOW < '18.00' THEN
SAY 'BEFORE 6PM'
ELSE
SAY 'AFTER 6PM'
|
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
|
|