Hi,
I store the date selected in a datetimepicker into a sqlserver table in
a SmallDateTime field.
To be compatible with the date format of my sql server, I convert the
date as following:
Dim d As Date
Dim dInDate As Date
Dim ciOriginal As cultureinfo
Dim ciDatabase As cultureinfo
ciOriginal = Thread.CurrentThread.CurrentCulture
ciDatabase = CultureInfo.CreateSpecificCulture("en-US")
Thread.CurrentThread.CurrentCulture = ciDatabase
dInDate = Date.Parse(Data("ExpiryDate").ToString)
d = Date.Parse(Data("ExpiryDate").ToString)
It works fine. Issue is : how to get the sqlserver date format as I
don't want to hardcode en-US as I do above.
Thanks!