Re: Inserting regional settings specific data into sql server
- From: "Cor Ligthert [MVP]" <notmyfirstname@xxxxxxxxx>
- Date: Fri, 10 Feb 2006 11:20:23 +0100
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
.
- References:
- Re: Inserting regional settings specific data into sql server
- From: Cor Ligthert [MVP]
- Re: Inserting regional settings specific data into sql server
- From: Cor Ligthert [MVP]
- Re: Inserting regional settings specific data into sql server
- From: Niketa Mahana
- Re: Inserting regional settings specific data into sql server
- From: Cor Ligthert [MVP]
- Re: Inserting regional settings specific data into sql server
- From: Niketa Mahana
- Re: Inserting regional settings specific data into sql server
- Prev by Date: Non-mapped column set to NULL during Fill.
- Next by Date: Re: Advice on possible concurrency issue
- Previous by thread: Re: Inserting regional settings specific data into sql server
- Next by thread: Re: Inserting regional settings specific data into sql server
- Index(es):