Board index » delphi » Year 2000 trouble

Year 2000 trouble

Hi,

I'm trying to update an application for year 2000 compliance, but some
of my TDateFields are giving me problems.  When I try to edit the fields
the mask fills in something like this:

XX/XX/__XX  (Where X is a digit.)

The problem seems to ber that even though the century is in the Paradox
table, the mask does not show it when the feild receives focus for
editing.

Is there a work around for this?

-Benjamin

 

Re:Year 2000 trouble


Quote
>The problem seems to ber that even though the century is in the Paradox
>table, the mask does not show it when the feild receives focus for
>editing.

Set the ShortDate format variable to display a 4 digit year

--
Brian Bushay (TeamB)
Bbus...@DataGuidance.com

Re:Year 2000 trouble


Hi:

 Set in the control panel, "Regional Settings", Date, Shor Date Style to :
dd/mm/yyyy

 This is my solution...

Happy new year...

Gilberto Moreno
Asesoft

Quote
Benjamin Johnson wrote in message <34B63E91.7...@juno.com>...
>Hi,

>I'm trying to update an application for year 2000 compliance, but some
>of my TDateFields are giving me problems.  When I try to edit the fields
>the mask fills in something like this:

>XX/XX/__XX  (Where X is a digit.)

>The problem seems to ber that even though the century is in the Paradox
>table, the mask does not show it when the feild receives focus for
>editing.

>Is there a work around for this?

>-Benjamin

Re:Year 2000 trouble


Gilberto,

Thanks for the help.  What I discovered is that Delphi sets up its
global ShortDateFormat based on the regional settings in Win95 that you
told me to alter.  This little trick fixes the problem without forcing
you to change the regional settings for your system. Use this line of
code in your project source or on the OnCreate event of your main form
to set the date format:

     ShortDateFormat := 'm/d/yyyy';  //Or whatever format you prefer

Thanks again for the help.

-Benjamin

Quote
Gilberto Moreno wrote:

> Hi:

>  Set in the control panel, "Regional Settings", Date, Shor Date Style to :
> dd/mm/yyyy

>  This is my solution...

> Happy new year...

> Gilberto Moreno
> Asesoft

Other Threads