SQL Server Client returning wrong format of datetime

EtaLasquera

Client
Регистрация
02.01.2017
Сообщения
526
Благодарностей
112
Баллы
43
Hello guys!

Yesterday I start to have a big, big problem... we work a lot with SQL Server queries and since yesterday all our computers start to receive wrong format of datetime and numeric formats, only in Zenno in all machines with Zenno Box and Zenno Poster, versions 5.16.2 and 5.29.x

If I use a common select command like select getdate()
SQL Management: 2019-08-01 09:55:001
Navicat: 2019-08-01 09:55:002
Zenno up to yesterday: 2019-08-01 09:55:003
Zenno today: 01/08/2019 09:55:004

Temporary solution, change windows language to EN-US.
Is the best solution since we need to change more than 10.000 select's with datetime formats to retrive format with provider.
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 812
Благодарностей
1 187
Баллы
113
Hello guys!

Yesterday I start to have a big, big problem... we work a lot with SQL Server queries and since yesterday all our computers start to receive wrong format of datetime and numeric formats, only in Zenno in all machines with Zenno Box and Zenno Poster, versions 5.16.2 and 5.29.x

If I use a common select command like select getdate()
SQL Management: 2019-08-01 09:55:001
Navicat: 2019-08-01 09:55:002
Zenno up to yesterday: 2019-08-01 09:55:003
Zenno today: 01/08/2019 09:55:004

Temporary solution, change windows language to EN-US.
Is the best solution since we need to change more than 10.000 select's with datetime formats to retrive format with provider.
To be honest I'm also not always understand how those DateTime formats are generated.
It seems that on different computers You can get different formats based on PC language settings.
I have played a lot with CultureInfo.CurrentCulture.DateTimeFormat but there are always sometimes some unexpected results.
Maybe @darkdiver can shed some light on this.
Thanks
 
  • Спасибо
Реакции: EtaLasquera

EtaLasquera

Client
Регистрация
02.01.2017
Сообщения
526
Благодарностей
112
Баллы
43
To be honest I'm also not always understand how those DateTime formats are generated.
It seems that on different computers You can get different formats based on PC language settings.
I have played a lot with CultureInfo.CurrentCulture.DateTimeFormat but there are always sometimes some unexpected results.
Maybe @darkdiver can shed some light on this.
Thanks
We use it a lot but always with datetime.parseexact(variable,"yyyy-MM-dd",cultureinfo.invariantculture)
I really don't know why only Zenno Poster receive another dateTime format :S
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)