SEC_TO_TIME shows like 00:00:00.000000

QuestionsSEC_TO_TIME shows like 00:00:00.000000
Martin asked 3 years ago

My query works fine:

I convert SECONDS to TIME in the query, but the grid shows the time with 6 zeros.

example: 13:40:22.000000

┬┐How can I avoid that?


1 Answers
Abu Ghufran answered 3 years ago


If you run this query in phpmyadmin or similar IDE, you might see same result data.

If you want only time, you can use substr function in sql. e.g.

SELECT, invdate ,,
i.note, substr(sec_to_time(,1,8) as total, i.closed
FROM invheader i
INNER JOIN clients c ON c.client_id = i.client_id

Your Answer

5 + 14 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?