#1 2015-07-10 09:20:37

noobies
Member
Registered: 2011-09-13
Posts: 139

wrong regional show datatime in drawgrid

i execute sql simple 'select dr from recs', field dr: TDateTime, in field stored data born without time. in prev version framework (1.18.1440) date show in drawgrid ok '01.01.1991', but today i get latest version and drawgrid show field dr  '1991-01-01'.
datetime stored date+time view ok in latest version '01.01.1990 10.00.00' and prev too.
How change view datetime with only date to regional setting?

Last edited by noobies (2015-07-10 09:23:51)

Offline

#2 2015-07-10 11:00:20

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: wrong regional show datatime in drawgrid

Which drawgrid?
How is your data layout?

I'm not able to reproduce the problem, e.g. with SynDBExplorer, which displays date/time with regional settings as expected.

Offline

#3 2015-07-10 12:05:25

noobies
Member
Registered: 2011-09-13
Posts: 139

Re: wrong regional show datatime in drawgrid

i try SynDBExplorer but the problem with regional date is still there
screen shot
https://www.dropbox.com/s/dbkc5es84k8nu … m.JPG?dl=0
base
https://www.dropbox.com/s/aeweca43ezhag … h.db3?dl=0

Offline

#4 2015-07-13 07:09:57

noobies
Member
Registered: 2011-09-13
Posts: 139

Re: wrong regional show datatime in drawgrid

i fix it, add this before create drawgrid

  tblList.SetFieldType('dr', sftDateTime, nil, -1);

but i dont understand why if i define dr as TDatetime and this field contain only date not considered sftDateTime in this code new version framework

  result := FieldType(Field,@EnumType); //in new version return sftUTF8Text except sftDateTime

AB, please fix this problem.

Last edited by noobies (2015-07-13 07:13:55)

Offline

#5 2015-07-13 11:11:23

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: wrong regional show datatime in drawgrid

So only 'YYYYMMDD' dates are affected, full Iso8601 date+time is correct.

Please try http://synopse.info/fossil/info/0a1c5eb07e

Offline

#6 2015-07-13 12:37:38

noobies
Member
Registered: 2011-09-13
Posts: 139

Re: wrong regional show datatime in drawgrid

thanks, all work fine

Offline

Board footer

Powered by FluxBB