Subject Re: [IBO] IB_Date wrong date formatting
Author mmenaz
I appreciate you both, Hie Joen and Dmitry Beloshistov, that tried to help me but, maybe due to my bad English, there has been a misunderstanding :)
I said:
"I've also noticed a problem with IB_Date when display format is:
dd/mm/yyyy
and edit mask is:
99/99/99"

It's like you go to your car reseller because your car does not turn on anymore, and he tells you "that's easy, use the bus instead!"
I know that using a two year digit format the four year digit problem disappears, of course, but DisplayFormat HAS to be dd/mm/yyyy, because this is the way I NEED it.
Furthermore, if confirmed as a bug, I could try to solve it. The control should act correctly in almost any common situations, not requiring you to avoid certain settings so no bug is found! ;)
So let's concentrate in the described situation :)

Regards
Marco Menardi

--- In IBObjects@y..., "Hie Joen" <hiejoen@b...> wrote:
> Try to add these lines in your project source.
>
> SysUtils.ShortDateFormat := 'dd/mm/yy';
> UpdateFormatSettings := False;
>
> HJ
>
> > I've also noticed a problem with IB_Date when display format is:
> > dd/mm/yyyy
> > and edit mask is:
> > 99/99/99
> > since the field is edited ok, and properly formatted when exited, but once
> re-entered, the first two digits of the year are put on the field instead of
> the last two. If you leave without edit it again is ok, but if you edit, for
> instance, the month, the date conversion generates an error.
> > (i.e. --> 10/12/01 is then displayed 10/12/2001. When re-entered the
> IB_Edit shows 10/12/20).