perchè la funzione sottostante , che esegue la giusta formattazione delle date, restituisce quest'errore:
Microsoft VBScript runtime error '800a005e'
Invalid use of Null: 'CStr'
codice:
<%
Dim ConnDown
Set ConnDown=Server.CreateObject("ADODB.Connection")
ConnDown.Open "driver={Microsoft Access Driver (*.mdb)};dbq="& server.MapPath(path&"N_CONF.mdb")
Dim SQLDown,RECDown
SQLDown="select * from n_conf order by nome asc"
Set RECDown=ConnDown.Execute(SQLDown)
Function ConvertiData(data)
giorno = Mid(data, InStr(1, data, "/") + 1, InStrRev(data, "/") - InStr(1, data, "/") - 1)
mese = Left(data, InStr(1, data, "/") - 1)
anno = Right(data, Len(data) - InStrRev(data, "/"))
ConvertiData = giorno & "/" & mese & "/" & anno
End Function
if RECDown.eof then
response.write "Record non trovato"
else
While Not RECDown.EOF
data = ConvertiData(CStr(RECDown("data")))
%>