"Syntax error converting datetime from character string"

W

wyy

Hi, I urgently need some help

We have written a .NET web application which uses the SQL
Server 2000 DB. We developed it under simplified chinese
windows environment.And it works fine under English
Windows OS. But our the Client's site use the traditional
chinese windows OS. it causes an exception with the
following error: "Syntax error converting datetime from
character string" . We have tried to change the system
regional settings and also tried to install different
language of .net framework 1.1, but the problem is still
there.

Could somebody please help with this issure?!
Thanks
 
T

Tom Gogolok

Hi,

we got these failure without chines os. These helped:
format the datetime data im program code with yyyyMMdd or
MMddyy

DateTime dtTest = DateTime.Now;

Console.WriteLine(dtTest.ToString("yyyyMMdd"));
Console.WriteLine(dtTest.ToString("yyyyMMdd hh:mm:ss"));

Hope it helps, Tom
 
T

Tom Gogolok

Hi,

we got these failure without chines os. These helped:
format the datetime data im program code with yyyyMMdd or
MMddyy

DateTime dtTest = DateTime.Now;

Console.WriteLine(dtTest.ToString("yyyyMMdd"));
Console.WriteLine(dtTest.ToString("yyyyMMdd hh:mm:ss"));

Hope it helps, Tom
 
T

Tom Gogolok

Hi,

we got these failure without chines os. These helped:
format the datetime data im program code with yyyyMMdd or
MMddyy

DateTime dtTest = DateTime.Now;

Console.WriteLine(dtTest.ToString("yyyyMMdd"));
Console.WriteLine(dtTest.ToString("yyyyMMdd hh:mm:ss"));

Hope it helps, Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top