Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

time of day and day of week change 1

Status
Not open for further replies.

westsidedeuce

Programmer
Jun 15, 2005
161
US
I want to change the time and day on a script to accommodate a customers request :

current :

IF DAY OF WEEK = day_weekday THEN
IF NOT TIME OF DAY = time_hours_mon_fri
execute After_hours
END IF
ELSE
IF NOT TIME OF DAY = time_hours_sat_sun THEN
execute After_hours
END IF

day _weekend is a script variable for weekdays mon-fri
and time_hours is for the time 7am-11pm

They want to open @ 700 am friday (today ) and close sat morning @1am -open again on sat @ 7am cloe at 1 am sun

Do I have to write a new script for this action - or just create a tag like the following :

IF DATE = day_fri THEN
IF NOT TIME OF DAY = time_hours_fri
execute After_hours
END IF
ELSE
IF NOT TIME OF DAY = time_hours_sat THEN
execute After_hours

? ?
Please forgive me _I'm very new at scripting -using merl mail - miran and symposium 4.5



Josephine Vigil
Henderson, Nevada USA
 
Does this script actually work because it is not written correctly.

An ELSE statement must exist within an IF and END IF not out side of it. I've also never seen IF NOT TIME OF DAY used, it is usual to use IF TIME OF DAY <> (does not equal).

To answer your question, assuming you have a normal working day section you can simply put another line with the appropriate date and time checks in at the head of the script which executes this section.
 
thank you captaingadget

IF DATE= nov 17 and time of day > 01:00..<07:00 then
execute execute After_hours
end if

and I placed the DATE nov 17 as an script variable

it worked

Thanks Again



Josephine Vigil
Henderson, Nevada USA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top