uso questo per la conversione:
codice:
Function FormatDateTimeLCID (str, nNamedFormat, nLCID)
dim strRet, nOldLCID
strRet = str
If (nLCID > -1) Then nOldLCID = Session.LCID
On Error Resume Next
If (nLCID > -1) Then Session.LCID = nLCID
If ((nLCID < 0) Or (Session.LCID = nLCID)) Then strRet = FormatDateTime(str, nNamedFormat)
If (nLCID > -1) Then Session.LCID = nOldLCID
FormatDateTimeLCID = strRet
End Function
La funzione sopra non è altro che un ampliamento della funzione FormatDateTime con l'aggiunta dell LCID quindi
dataItaliana = FormatDateTimeLCID(Date(),2,1040)
dataInglese = FormataDateTimeLCID(Date(),2,1033)
per il db ti conviene sempre inserirli o fare le query utilizzando la data nel formato YYYY/MM/GG
questa è presa da weppos, nel tuo caso non ti serve l'ora
codice:
public function formatDateTimeDb(dtmDateValue, dtmTimeValue)
formatDateTimeDb = Year(dtmDateValue) &_
"/" & Month(dtmDateValue) &_
"/" & Day(dtmDateValue) &_
" " & dtmTimeValue
end function
[EDIT]
si il right("00"&month(dtData),2) di Orcim è stilisticamente + corretto ma funzionalmente non cambia tanto
[/EDIT]