Ho fatto delle prove non come intendevo ma tanto per provare alternative!
dopo aver chiuso il rs ho aggiunto
codice:
ora = FormatDateTime(Now(),4) & " "
if weekday(date) = 1 then
giorno = ("domenica")
end if
if weekday(date) = 2 then
giorno = ("lunedi")
end if
if weekday(date) = 3 then
giorno = ("martedi")
end if
if weekday(date) = 4 then
giorno = ("mercoledi")
end if
if weekday(date) = 5 then
giorno = ("giovedi")
end if
if weekday(date) = 6 then
giorno = ("venerdi")
end if
if weekday(date) = 7 then
giorno = ("sabato")
end if
response.write ora & "
" & giorno
Sql = " SELECT * FROM tbl_orari_streaming WHERE giorno LIKE '%" & giorno & "%'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
if rs.eof then
Response.Write("Nessuno online adesso.")
else
for i=1 to rs.recordcount
rs.absoluteposition=i
If rs(2) >= ora and rs(2) <= ora then
response.write rs(1)
end if
next
end if
rs.Close
set rs = Nothing
conn.Close
set conn = Nothing
Ma il problema è che gli orari salvati nel database essendo in formato ora breve 24 h se per esempio inserisco le 3 ( 03.00 ) viene salvato come 3.00 non riesco a compararle con la data prelevata dal server che nel caso delle 3 sarebbe 03.00.
infatti nella stringa
codice:
If rs(2) >= ora and rs(2) <= ora then
response.write rs(1)
end if
mi restituisce ... niente nono stante che mi sia fatto stampare a video i risultati ed essendo purtroppo in formatto h.mm e non hh.mm !!!

HELP!!!