Convert DB field using math functions

QuestionsConvert DB field using math functions
Joey Newsom asked 5 years ago

I have a DB field called 'time' which is an integer field containing seconds… (minutes and seconds were converted to seconds for easier sorting of 'time' field)

In my GRID, I need to convert the time back to minutes and seconds in the format MM:SS.

Any suggestions?


1 Answers
Abu Ghufran answered 5 years ago

You can use mysql date_format function in sql, and get desired format in grid.
Even if you want to do this conversion at application level, you can refer on_data_display event handler (demos/editing/custom-events.php)

Your Answer

17 + 7 =

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 / 5. Vote count:

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

Let us improve this post!