Datetime issue
UPDATE: Thanks for the comments, it gave me some directions. Well It's working now with this little test:
If
CultureInfo.CurrentCulture.Name.IndexOf("US") > -1 ThendtEndRange = Now.ToString("MM/d/yy")
Else
dtEndRange = Now.ToString("d/MM/yy")
End If
And I am not certain after all this was coming from SQL Server, more from the Windows server settings.
I have 2 SQL installations on two different machines. One is installed with dates in US and the other in European format.
In my code I need to send to a stored procedure the actual date.
Well the problem here is that I have an error if I send the European formatted date to the US box and vice versa for the other box.
The last thing I tried is this but it works obviopusly only on one box:
dtEndRange = Now.ToString("MM/d/yy")
I heard somewhere, and I can't remember how to use it, something about a Culture class.
Any idea ?