Date/Time Problem in Delphi 7

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
destrocaipora
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 22.11.2005, 14:24

Date/Time Problem in Delphi 7

Post 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
silviogs
Junior Boarder
Junior Boarder
Posts: 42
Joined: 24.08.2005, 12:54
Location: The Most Oriental Point of America - João Pessoa - Brazil
Contact:

Post by silviogs »

Hi Ricardo

Which is exactly your problem my friend.

Respectfully

Silvio Guedes
gto
Zeos Dev Team
Zeos Dev Team
Posts: 278
Joined: 11.11.2005, 18:35
Location: Porto Alegre / Brasil

Post 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 ;)
Use the FU!!!!!IN Google !

gto's Zeos Quick Start Guide

Te Amo Taís!
destrocaipora
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 22.11.2005, 14:24

Post 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
destrocaipora
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 22.11.2005, 14:24

Post by destrocaipora »

Nobody has found this problem? only me?
pol
Senior Boarder
Senior Boarder
Posts: 91
Joined: 13.10.2005, 08:19

Post 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
DiegoBM
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 09.02.2006, 13:33

Post 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.
silviogs
Junior Boarder
Junior Boarder
Posts: 42
Joined: 24.08.2005, 12:54
Location: The Most Oriental Point of America - João Pessoa - Brazil
Contact:

Post 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
Post Reply