SEC_TO_TIME Bug ?

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
martin.gross
Posts: 2
Joined: Thu 28 Aug 2008 15:35
Location: Germany

SEC_TO_TIME Bug ?

Post by martin.gross » Thu 28 Aug 2008 16:44

Dear Everybody,

i use MyDac 5.10.010 and i have following problem.

This Query works correct:

SELECT SEC_TO_TIME(86410) + 0
-> 240010

This Query works incorrect:

SELECT SEC_TO_TIME(86410)
-> 00:00:10

The correct answer for the secound Query is a formated-String
like this: 24:00:10

Is this a bug and is he fixed in the new Version 5.5 of MyDac

Many Thanks in Advance

Please Excuse my bad englisch :oops:

eduardosic
Posts: 387
Joined: Fri 18 Nov 2005 00:26
Location: Brazil

Re: SEC_TO_TIME Bug ?

Post by eduardosic » Fri 29 Aug 2008 17:55

martin.gross wrote:Dear Everybody,

i use MyDac 5.10.010 and i have following problem.

This Query works correct:

SELECT SEC_TO_TIME(86410) + 0
-> 240010

This Query works incorrect:

SELECT SEC_TO_TIME(86410)
-> 00:00:10

The correct answer for the secound Query is a formated-String
like this: 24:00:10

Is this a bug and is he fixed in the new Version 5.5 of MyDac

Many Thanks in Advance

Please Excuse my bad englisch :oops:
24:00:00 ?? no.. 23:59 -> 00:00 -> 00:01

martin.gross
Posts: 2
Joined: Thu 28 Aug 2008 15:35
Location: Germany

Post by martin.gross » Sat 30 Aug 2008 21:30

Dear eduardosic,

the first Query is also more then 24 Hours.

When you use phpmyadmin or the Command Line Client with
this Query:

SELECT SEC_TO_TIME(86410)

the result is 24:00:10

Best regards

martin gross

eduardosic
Posts: 387
Joined: Fri 18 Nov 2005 00:26
Location: Brazil

Post by eduardosic » Sun 31 Aug 2008 01:38

martin.gross wrote:Dear eduardosic,

the first Query is also more then 24 Hours.

When you use phpmyadmin or the Command Line Client with
this Query:

SELECT SEC_TO_TIME(86410)

the result is 24:00:10

Best regards

martin gross
Hi martin.gross the query SELECT SEC_TO_TIME(86410) returns a TDateTime.. and in TDateTime Type.. the hour 24:00 don't exists;;

please, set TMyQuery.Options.FieldAsString = True to return a String Field and Display 24:00:10

King Regards

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 01 Sep 2008 07:02

The Delphi Time object doesn't allow keeping time more than 24 hours.

Post Reply