Re: Inserting regional settings specific data into sql server



Niketa,

I am always in doubt about the seperators between times. So thank you for
telling me this about Italy.

However try it first with that Parameter sample that I showed you.

If you are using C# something as, not checked changed in this message..

cmd.Parameters.Clear();
SQLCommand cmd = new SQLCommand("SELECT * FROM MyTable WHERE MyDate BETWEEN
@BeginDate And @EndDate", Conn);
cmd.Parameters.Add("@BeginDate", DateTime.Parse(txtBeginDate.text));
cmd.Parameters.Add("@EndDate", DateTime.Parse(txtEndDate.text));

If it is a true regional setting, than it should work.

Otherwise you have to translate it using that DateTime.ParseExact from which
I gave you all the links in my other message. However than you have
localized your program.

Cor



.