You should never store a localized date string in the database.
You must store dates in date columns and then localize the data at the moment of showing it.
1. Set the locale of your site UI
This example set the lang according to the request path, but may have other mechanism.
Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
Dim lang As String
If HttpContext.Current.Request.Path.Contains("/en/") Then
lang = "en" 'english'
ElseIf HttpContext.Current.Request.Path.Contains("/pt/") Then
lang = "pt" 'portugues'
Else
lang = "es" 'espa?ol, the default for the site'
End If
Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(lang)
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(lang)
End Sub
2. Get the input to date variables
Getting the data from the text input is easy, this is an example, but with a date validator you should be ok.
dim theDate as date
if IsDate( txtDate.text ) then
theDate = DateTime.Parse(txtDate.text)
else
'throw exception or something
end if
Edit
Since you say you can't change the way it is stored, you are in big trouble, unless you have in the db record some way to tell the format of the date. The problem is not the separators, but when you find a date like 6/3/2009 you dont know if it is 6 of march or 3 of june.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…