Zeos 6.6.3 D2007 datetime Mysql 4.1.22
Posted: 18.04.2009, 09:54
Sorry for my english.
This problem cause me most difficulty.
I'have a table with field type declared DATE, TIME, DATETIME and read data with ZTable and ZQuery. If the value in field is 00:00:00 Zeos return Null, else if the value is 24:00:00 Zeos return 00:00:00 but is not the same.
If execute a sql like this and I've the result in two controls dbgrid and memo in combination with FormatDateTime() function:
INSERT INTO dbname (mdate,mtime,mdatetime) VALUES
('2009-01-01','00:00:00','2009-01-01 00:00:00')
mtime return blanck and mdatetime return 01/01/2009 in dbgrid
mtime return null and mdatetime return null in memo
another:
INSERT INTO dbname (mdate,mtime,mdatetime) VALUES
('2009-01-01','24:00:00','2009-01-01 00:00:00')
mtime return 00:00:00 and mdatetime return 01/01/2009 in dbgrid (Time is blanck)
mtime return 00:00:00 and mdatetime return null in memo
I've try to use TDateTime class to store the valuse of mdatetime and the result of 2009-01-01 00:00:00 is 01/01/2009 00:00:00 but this method increase a lot the line of my code.
Help ...
This problem cause me most difficulty.
I'have a table with field type declared DATE, TIME, DATETIME and read data with ZTable and ZQuery. If the value in field is 00:00:00 Zeos return Null, else if the value is 24:00:00 Zeos return 00:00:00 but is not the same.
If execute a sql like this and I've the result in two controls dbgrid and memo in combination with FormatDateTime() function:
INSERT INTO dbname (mdate,mtime,mdatetime) VALUES
('2009-01-01','00:00:00','2009-01-01 00:00:00')
mtime return blanck and mdatetime return 01/01/2009 in dbgrid
mtime return null and mdatetime return null in memo
another:
INSERT INTO dbname (mdate,mtime,mdatetime) VALUES
('2009-01-01','24:00:00','2009-01-01 00:00:00')
mtime return 00:00:00 and mdatetime return 01/01/2009 in dbgrid (Time is blanck)
mtime return 00:00:00 and mdatetime return null in memo
I've try to use TDateTime class to store the valuse of mdatetime and the result of 2009-01-01 00:00:00 is 01/01/2009 00:00:00 but this method increase a lot the line of my code.
Help ...