Page 1 of 1

SEC_TO_TIME Bug ?

Posted: Thu 28 Aug 2008 16:44
by martin.gross
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:

Re: SEC_TO_TIME Bug ?

Posted: Fri 29 Aug 2008 17:55
by eduardosic
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

Posted: Sat 30 Aug 2008 21:30
by martin.gross
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

Posted: Sun 31 Aug 2008 01:38
by eduardosic
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

Posted: Mon 01 Sep 2008 07:02
by Dimon
The Delphi Time object doesn't allow keeping time more than 24 hours.