Board index » delphi » : How can i change the displaymask of a date field within paradox

: How can i change the displaymask of a date field within paradox

hi,

I want to change the displaymask of date field from '99-99-99' to
'99-99-9999'. There must be an easy trick to do this, but i can't find it. I
have tried bdeapi DbiSetDateFormat, but that gives my a EDBEngineError.
Maybe there is somebody that can help with this problem.

TIA

Daniel Dijkhuizen.

Real Programmers are surprised when the odometers in their cars don't turn
from 000009 to 00000A.

 

Re:: How can i change the displaymask of a date field within paradox


Re:: How can i change the displaymask of a date field within paradox


Here is a simple way.
Put this line in your mainform oncreate() event.

ShortDateFormat:='dd-mm-yyyy';

It is simple and works!

D.Dijkhuizen ha scritto nel messaggio ...

Quote
>hi,

>I want to change the displaymask of date field from '99-99-99' to
>'99-99-9999'. There must be an easy trick to do this, but i can't find it.
I
>have tried bdeapi DbiSetDateFormat, but that gives my a EDBEngineError.
>Maybe there is somebody that can help with this problem.

>TIA

>Daniel Dijkhuizen.

>Real Programmers are surprised when the odometers in their cars don't turn
>from 000009 to 00000A.

Re:: How can i change the displaymask of a date field within paradox


Quote
D.Dijkhuizen <D.Dijkhui...@prevalent.nl> wrote in message

news:PRVL42571574BA@prevalent.nl...

Quote
> I want to change the displaymask of date field from '99-99-99' to
> '99-99-9999'. There must be an easy trick to do this, but i can't find it.
I
> have tried bdeapi DbiSetDateFormat, but that gives my a EDBEngineError.
> Maybe there is somebody that can help with this problem.

Do you mean the DisplayFormat or the EditMask?

--
Stephen Brown

Re:: How can i change the displaymask of a date field within paradox


Re:: How can i change the displaymask of a date field within paradox


I think you have to change 2 things:  The BDEFOURDIGITYEAR setting in
the BDE Aministrator  (run the Administator, then on the Configuration
tab, go to Configuration, System, Format, Date) should be set to TRUE.

Then, in your Delphi program you say:

ShortDateFormat := 'm/d/yyyy';

If you are actually using Paradox directly then I don't know if there
is something else

Hope this helps
Clare
Clar...@usa.net

On Fri, 24 Sep 1999 09:05:17 +0200, "D.Dijkhuizen"

Quote
<D.Dijkhui...@prevalent.nl> wrote:
>hi,

>I want to change the displaymask of date field from '99-99-99' to
>'99-99-9999'. There must be an easy trick to do this, but i can't find it. I
>have tried bdeapi DbiSetDateFormat, but that gives my a EDBEngineError.
>Maybe there is somebody that can help with this problem.

>TIA

>Daniel Dijkhuizen.

>Real Programmers are surprised when the odometers in their cars don't turn
>from 000009 to 00000A.

Other Threads