Datetime problem

  • Thread starter Thread starter Miliuccio
  • Start date Start date
M

Miliuccio

I read from SQL 2000 Server 13/02/2005 00.00.00
my sql CE server must to have 02-13-2005 0:00:00

wath must i change on my sql CE Server to accept first kind of string
 
see the CONVERT function in the SQL CE books online.
You can convert your datetime characters into a variety of
international formats.

another option is to take the value from SQL Server 2000
and use the .NET DateTime class's formatting options
to convert to the format you want before you insert into
SQL CE.

--
Darren Shaffer
..NET Compact Framework MVP
Principal Architect
Connected Innovation
www.connectedinnovation.com
 
Shouldn't ADO.NET provider take care of this kind of things if he uses
properly typed parameters?
 
Alex,

It's not really clear what he's doing - he could be
using RDA-pull or Merge or he could simply be
noticing a difference between the datetime format
of his data in the two different databases.

Based on that, I gave him two options on how to
get his data into the format he wants using SQL CE
or code.

If he is in fact using parameterized SQL for his INSERT,
you are correct that the format will take on whatever
format is dictated by the localization rules of his version
of SQL CE and the locale identifier he used in creating
his database.
--
Darren Shaffer
..NET Compact Framework MVP
Principal Architect
Connected Innovation
www.connectedinnovation.com
 
Back
Top