Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread DateTime columns
Mon, Jan 14 2019 4:27 PMPermanent Link

Ronald

Hi all,

In 2.06 Build 20 date and time columns are no longer localized. But DateTimeColumns are still localized.
So am I correct that I have to change my Date fields in a TDataset into DateTimeFields in order to make use of the LocalizeDateTimeColumns property?

Ronald
Mon, Jan 14 2019 5:30 PMPermanent Link

Raul

Globestar Systems

Team Elevate Team Elevate

On 1/14/2019 4:27 PM, Ronald wrote:
> In 2.06 Build 20 date and time columns are no longer localized. But DateTimeColumns are still localized.

Yes

> So am I correct that I have to change my Date fields in a TDataset into DateTimeFields in order to make use of the LocalizeDateTimeColumns property?

Yes if you want to take advantage of the LocalizeDateTimeColumns.

Otherwise the answer depends on your use case and what those fields are
used for in your application.

Release notes IMHO cover the reasons behind this well so you can decide
what makes sense for your use case.

Raul
Wed, Jan 16 2019 8:25 AMPermanent Link

Huseyin Aliz

myBiss ApS

Avatar

Hi,

I have the same issue. I've tried to disable LocalizeDateTimeColumns in
dataset property but it seems that it did not work, only solution for me
is the same solution with you, changing date fields to datetime fields.
Issue doing that from what i can see is that time are shown as 00:00,
like 01-01-2019 00:00. Dont know if there is something easy to overcome
this.

Regards,
Hüseyin

Den 14-01-2019 kl. 22:27 skrev Ronald:
> Hi all,
>
> In 2.06 Build 20 date and time columns are no longer localized. But DateTimeColumns are still localized.
> So am I correct that I have to change my Date fields in a TDataset into DateTimeFields in order to make use of the LocalizeDateTimeColumns property?
>
> Ronald
>
Wed, Jan 16 2019 4:30 PMPermanent Link

Walter Matte

Tactical Business Corporation

There was a breaking change in 2.06 B20.

The issue in prior releases was Date fields alone (no time) cannot be localized and they were.

The same with Time fields alone (no date) cannot be localized and they were.

The current release 2.06 B20 - fixes this so that Date fields or Time fields are not localized.

If you need localization you need to use DateTime fields.

Walter
Thu, Jan 17 2019 9:50 AMPermanent Link

Ronald

Walter Matte wrote:

<There was a breaking change in 2.06 B20.>


Yes, I read about it. I read and save records in a DBISam table with a module. When the module saves a record I convert the Unix date to a DBISam date and have it localized.
When the module sends a record the DBISam dates are unlocalized and converted to a Unix date.

That works fine.

Greetings,
Ronald
Tue, Jan 29 2019 9:10 AMPermanent Link

Huseyin Aliz

myBiss ApS

Avatar

I fixed my issue by using ongettext for the datetime field. Like:

if (myDataset.columns['Dato'].asstring <> '') then
result := datetostr(myDataset.columns['Dato'].asdatetime) else result := '';

Dont know if there are smarter ways of doing this (showing date within
grid).

Regards,
Hüseyin

Den 17-01-2019 kl. 15:50 skrev Ronald:
> Walter Matte wrote:
>
> <There was a breaking change in 2.06 B20.>
>
>
> Yes, I read about it. I read and save records in a DBISam table with a module. When the module saves a record I convert the Unix date to a DBISam date and have it localized.
> When the module sends a record the DBISam dates are unlocalized and converted to a Unix date.
>
> That works fine.
>
> Greetings,
> Ronald
>
Image