Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Date Stored In DBISAM Table Is Different From Actual Date
Wed, Feb 14 2018 10:03 PMPermanent Link

Frederick Chin

My date format settings are as follows:-

     FormatSettings.ShortDateFormat := 'dd MM yyyy';
     FormatSettings.DateSeparator := '/';

My current date is 15/02/2018.

When the following code is run,

  with tblAsset do begin
       insert(True);
       lblState.Caption:=Columns['date'].asString+', '+DateToStr(Date);
  end;

lblState shows 14/02/2018, 15/02/2018

What is happening here?

--
Frederick
Thu, Feb 15 2018 3:18 AMPermanent Link

Huseyin Aliz

myBiss ApS

Avatar

Hi Frederick,

You need to set LocalizeDateTimeColumns to true for every dataset you
have in your forms. Also on webserver dataset you need following:

LocalizeDateTimeColumns=0 -> LocalizeDateTimeColumns=1

Hope it's usable for you.

Regards,

Hüseyin


Den 15-02-2018 kl. 04:03 skrev Frederick Chin:
> My date format settings are as follows:-
>
>        FormatSettings.ShortDateFormat := 'dd MM yyyy';
>        FormatSettings.DateSeparator := '/';
>
> My current date is 15/02/2018.
>
> When the following code is run,
>
>     with tblAsset do begin
>          insert(True);
>          lblState.Caption:=Columns['date'].asString+', '+DateToStr(Date);
>     end;
>
> lblState shows 14/02/2018, 15/02/2018
>
> What is happening here?
>
> --
> Frederick
>
Thu, Feb 15 2018 9:15 AMPermanent Link

Frederick Chin

Hi Huseyin,

/*
You need to set LocalizeDateTimeColumns to true for every dataset you
have in your forms. Also on webserver dataset you need following:

LocalizeDateTimeColumns=0 -> LocalizeDateTimeColumns=1
*/

Thanks. The changes to the datasets solved the problem.
--
Frederick
Image