L
le0
Hello guys,
Is there anything wrong with my code (see below) bcoz when 10p-6a shift my
browser returns the error cannot be a zero-length string. Im wondering why,
bcoz the 2 other shift works perfectly.
<%
'Shift: 6a-2p
if DatePart("h", Now()) > 5 And DatePart("h", Now()) < 14 then
ShiftID = "A"
end if
'Shift: 2p-10p
if DatePart("h", Now()) > 13 And DatePart("h", Now()) < 22 then
ShiftID = "B"
end if
'Shift: 10p-6a
if DatePart("h", Now()) > 21 And DatePart("h", Now()) < 6 then
ShiftID = "C"
end if
%>
Is there anything wrong with my code (see below) bcoz when 10p-6a shift my
browser returns the error cannot be a zero-length string. Im wondering why,
bcoz the 2 other shift works perfectly.
<%
'Shift: 6a-2p
if DatePart("h", Now()) > 5 And DatePart("h", Now()) < 14 then
ShiftID = "A"
end if
'Shift: 2p-10p
if DatePart("h", Now()) > 13 And DatePart("h", Now()) < 22 then
ShiftID = "B"
end if
'Shift: 10p-6a
if DatePart("h", Now()) > 21 And DatePart("h", Now()) < 6 then
ShiftID = "C"
end if
%>