Board index » delphi » Date format re: Delphi 2.0 and Oracle 7.3

Date format re: Delphi 2.0 and Oracle 7.3

Hope someone can help with this...

Running Delphi 2.0 connecting to Oracle 7.3 we get dates
displayed in American format, instead of the British we
require.
However, using the Database Desktopn to view a table
of view, the date is displayed correctly, so presumably
this is a Delphi problem, although the program we are running
did not have this problem in Delphi 1.  Do date formats
have to be set specifically in Delphi 2.0?

We have tried:

Setting the Windows 95 date setting to 'English(British)'
Setting the date form in the BDE to the correct format.
Setting NLS_DATE_FORMAT in the Oracle parameter file for
the database.

None of these seems to have an effect.

Any suggestions?

Thanks in advance,

Steven Hovington

 

Re:Date format re: Delphi 2.0 and Oracle 7.3


Quote
"Steven H." <steve.hoving...@datacore.demon.co.uk> wrote:
>Hope someone can help with this...

>Running Delphi 2.0 connecting to Oracle 7.3 we get dates
>displayed in American format, instead of the British we
>require.
>However, using the Database Desktopn to view a table
>of view, the date is displayed correctly, so presumably
>this is a Delphi problem, although the program we are running
>did not have this problem in Delphi 1.  Do date formats
>have to be set specifically in Delphi 2.0?

>We have tried:

>Setting the Windows 95 date setting to 'English(British)'
>Setting the date form in the BDE to the correct format.
>Setting NLS_DATE_FORMAT in the Oracle parameter file for
>the database.

>None of these seems to have an effect.

Hi
Silly old SQL seems to insist on its dates being in US format.
Is this the problem ?
I had your problem and same symtoms but it was on NT
so I assumed that NT was not pickiing up the date format correctly.
However I cured the problem by putting, on the create process of my
first delphi form, the  instruction
Systils.DateFormat := dd/mm/yyyy;
that did it.
dave

- Show quoted text -

Quote

>Any suggestions?

>Thanks in advance,

>Steven Hovington

Re:Date format re: Delphi 2.0 and Oracle 7.3


There is a bug is the Delphi 2 (and 3) Sysutils unit.

The effect of this bug is that Delphi reads the wrong information when
picking up the date, time and user information.  Look in the Sysutils unit
and find the place where the ShortDateFormat is set.

Once you have found this then simply rewrite the functions to override the
values set in Sysutils (since they are completely wrong).

I cannot give anymore information because it was so long ago when I found
the error that I have forgotten where it is.

Regards

Colin Dawson
cdaw...@athene.co.uk
http://www.athene.co.uk/homepages/cdawson

begin 666 Colin Dawson.vcf
M0D5'24XZ5D-!4D0-"E9%4E-)3TXZ,BXQ#0I..D1A=W-O;CM#;VQI;@T*1DXZ
M0V]L:6X@1&%W<V]N#0I54DPZ:'1T<#HO+W=W=RYA=&AE;F4N8V\N=6LO:&]M
M97!A9V5S+V-D87=S;VX-"D5-04E,.U!2148[24Y415).150Z8V1A=W-O;D!A
M=&AE;F4N8V\N=6L-"E)%5CHQ.3DX,#0R-50Q.3(Q,S%:#0I%3D0Z5D-!4D0-
!"@``
`
end
end

Other Threads