SEC_TO_TIME shows like 00:00:00.000000

QuestionsSEC_TO_TIME shows like 00:00:00.000000
Martin asked 8 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?

Thanks!

1 Answers
Abu Ghufran answered 8 years ago

Hi,

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 i.id, invdate , c.name,
i.note, substr(sec_to_time(i.total),1,8) as total, i.closed
FROM invheader i
INNER JOIN clients c ON c.client_id = i.client_id

Your Answer

7 + 17 =

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?