Page 1 of 1

Date/Time Problem in Delphi 7

Posted: 22.11.2005, 18:23
by destrocaipora
Hi everybody...

I have a problem when i try to show a date from a table in my database postgresql 7.4.2

I'm using the last version of ZEOS to Delphi 7.

The object table returns date (30/12/1899), when i show it in a grid.

The same happens in delphi 5, so i never used ZEOS to show data, only to exec updates, etc...

Is there some fix, or patch to this error? Is some configuration?

Tks everybody!

Rodrigo

Posted: 22.11.2005, 18:32
by silviogs
Hi Ricardo

Which is exactly your problem my friend.

Respectfully

Silvio Guedes

Posted: 22.11.2005, 18:43
by gto
Hello :)

Try with a mask.
Pick the component, double-click on it, select your field, on the object inspector put:

DisplayFormat: dd/mm/yyyy
EditMask: !99/99/9999;1;_

It may help!!

abraços ;)

Posted: 22.11.2005, 19:14
by destrocaipora
Silvio, the problem is that Zeos show 0 value to de date fields

the grid shows 30/12/1899 because this is the value to de TDateTime 0.

I have a Time field too, that shows 00:00:00.

Gto, the Mask not works..

Tks!!

Rodrigo

Posted: 23.11.2005, 19:54
by destrocaipora
Nobody has found this problem? only me?

Posted: 24.11.2005, 09:48
by pol
Hi!
What is the real value in your table? Have you seen it with other utilities?
Have you tried ZSQLMonitor? Sometimes it helps.
Regards,
Rüdiger

Posted: 23.02.2006, 12:03
by DiegoBM
Hi,

This is a bug from Zeos components on the interface with PostgreSQL.
The matter is that Zeos components only parse Date formats like 1999-02-01 (i.e. ANSI SQL Date Format), but PosgreSQL can be configured to support the SQL style (your Date format I guess..), the German style,...

To resolve this bug you have to modify the function
"ZDbcPostgreSQLResultSet.pas" --> "GetDate" to process Date formats like ##/##/####

Regards.

Posted: 23.02.2006, 18:16
by silviogs
Hello friends

my problem not in the delphi7 and yes in the lazarus 0.9.12 and zeoslib 6.5.1 cvs and postgresql 8.1.3.

Thank you very much

Silvio Guedes