Sylvain
Tue Nov 29 17:23:16 CST 2005
I never said that a string was more precise, I only said that by using a
string, the value "11/17/2005 8:15:29 am" as seen on the SQL-Server will
always been seen exactly like this on the .NET side and never become
something like "11/17/2005 8:15:28 am" by magic because of some floating
point conversion problem between .NET and SQL-Server.
You say in your previous post that « The .Net datetime can give the exact
equivalent in the same precision as the datetime in SQL server » ; I agree
with you that this should be the case in a perfect world and I don't know
how the original discrepancy that the OP saw had occured. Maybe it's
normal, maybe not; I don't know because for one reason I didn't take the
time of exploring any further this conversion problem. Furthermore, I don't
know how OP will react to a suggestion like this or if he will be plagued by
culture problem or anything else. In fact, I don't even know if this is a
real problem for him or only a curiosity matter; however it's up to him to
take any decision on that point and not to you to say that my suggestion was
stupid.
Finally, I don't remember having read any solution from your previous posts.
Saying that the numbers of ticks between SQL-Server and .NET are not the
same is an explanation, not a solution.
--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail:
http://cerbermail.com/?QugbLEWINF
"Cor Ligthert [MVP]" <notmyfirstname@planet.nl> wrote in message
news:uv6ETMR9FHA.1332@tk2msftngp13.phx.gbl...
>> And could you explain to me why it is so worse to resolve a difference in
>> precision between two different systems by using an intermediate
>> character representation?
>>
> Because you cannot fix that with a string, a string cannot be more precise
> than one of those.
>
> The .Net datetime can give the exact equivalent in the same precision as
> the datetime in SQL server, while the String is not always able to do
> that, it has to be rounded.
>
> However worse is that a datetime in a String has the bad behaviour to be
> culture depended, something that are the DateTime formats in SQL server
> and .Net not.
>
> Cor
>
>
>