La metti in un include o la scrivi in cima alla pagina dove la utilizzi
codice:
Function FormatDateTimeLCID (str, nNamedFormat, nLCID)
dim strRet, nOldLCID
strRet = str
nOldLCID= Session.LCID
On Error Resume Next
If (nLCID > -1) Then Session.LCID = nLCID
strRet = FormatDateTime(str, nNamedFormat)
If (nLCID > -1) Then Session.LCID = nOldLCID
FormatDateTimeLCID = strRet
End Function
'....altro tuo codice
db.execute("Update tblTopic set LastDate = '" & FormatDateTimeLCID
(Now,2,1040) & "', Replies = Replies + 1 where PostID = " & ReplyToID)
'......altro tuo codice
La stessa funzione la puoi anche utilizzare quando vai a leggere il valore dal database
codice:
dataDb = FormatDateTimeLCID(RecordSet("LastDate"),2,1040)