Since datetimes are numbers of seconds change any increment to a multiple you like:
do temp=first_time to second_time by 60;
if weekday(datepart(temp)) ne 1 and
datepart(temp) ne holiday('NEWYEAR',year(datepart(temp))) and
datepart(temp) ne holiday('MEMORIAL',year(datepart(temp))) and
datepart(temp) ne holiday('USINDEPENDENCE',year(datepart(temp))) and
datepart(temp) ne holiday('LABOR',year(datepart(temp))) and
datepart(temp) ne holiday('THANKSGIVING',year(datepart(temp))) and
datepart(temp) ne holiday('CHRISTMAS',year(datepart(temp))) then seconds+60;
end;
increments by 60 seconds or one minute
do temp=first_time to second_time by 3600;
if weekday(datepart(temp)) ne 1 and
datepart(temp) ne holiday('NEWYEAR',year(datepart(temp))) and
datepart(temp) ne holiday('MEMORIAL',year(datepart(temp))) and
datepart(temp) ne holiday('USINDEPENDENCE',year(datepart(temp))) and
datepart(temp) ne holiday('LABOR',year(datepart(temp))) and
datepart(temp) ne holiday('THANKSGIVING',year(datepart(temp))) and
datepart(temp) ne holiday('CHRISTMAS',year(datepart(temp))) then seconds+3600;
end;
increment by 3600 seconds or 1 hour.
24*3600= 24 hours (1 day).
... View more