Di default qualsiasi database access memorizza la data all'inglese, per questo succedono casini immani quando cerchi di recuperare da codice asp utilizzando le funzioni della data, soprattutto se la data è inserita all'italiana.
Perchè finchè metti il 14/08/2005 è chiaro che può essere solo che il 14 agosto...ma quando andrai ad inserire il 03/04/2005 sarà il 4 marzo o il 3 aprile?
Pertanto intanto ti consiglio di inserire le date nel formato in cui il db se le aspetta (quindi all'inglese).
Cambia il formato della data ed impostalo nel formato tipo AAAA/MM/GG.
E' un modo decisamente puù sicuro, certo darà qualche noia in più in inserimento, ma vedrai che sarai soddisfatto una volta che devi gestire i dati.
Questa è un esempio di funzione che trasforma al momento dell'inserimento nel db, la data nel formato AAAA/MM/GG:
codice:
<%
function convertDate(theDate)
if isDate(theDate) then
theYear = datePart("yyyy",theDate)
theMonth = datePart("m",theDate)
theDay = datePart("d",theDate)
if theMonth < 10 then theMonth = "0" & theMonth
if theDay < 10 then theDay = "0" & theDay
convertDate = theYear & "/" & theMonth & "/" & theDay
end if
end function
myDate = date()
response.write convertDate(myDate)
%>