I have the following given in the bank 55:42:55 and I need to make it more readable this way 2d7h42m how could I do this formatting?
3
Fundamental [Dit] the question and explain which type of field used, makes a difference in this case. The normal would be a time field or numeric, and the formatting be done in the client language, if any, and not in SQL. If it’s string, you already need to convert.
@Bacco well, this result is a seconds conversion with SEC_TO_TIME so probably the field is a varchar... In case there was a way to humanize seconds directly into this format %Dd %Hh %Mm would also solve
Fundamental [Dit] the question and explain which type of field used, makes a difference in this case. The normal would be a time field or numeric, and the formatting be done in the client language, if any, and not in SQL. If it’s string, you already need to convert.
– Bacco
Seria this here ?
– rray
@rray not exactly...
– Vinicios Yals
@Bacco well, this result is a seconds conversion with SEC_TO_TIME so probably the field is a varchar... In case there was a way to humanize seconds directly into this format
%Dd %Hh %Mm
would also solve– Vinicios Yals
@rray your example is specific to php, I need the result to exit pre-formatted from the database.
– Vinicios Yals