This topic is locked

Seconds value into minutes only

12/10/2007 7:42:30 AM
PHPRunner General questions
B
bharat25 author

Hi all

please help me on my problem i am using an cdr billing database i have mysql table storing value in seconds i want to show this value in minutes only (with round) mean if i have 61 Sec this it should be 2 min but i have some more like i have 3 types of billing like 60/60 show in round minute and 30/30 in .5 and 1/1 as in db please help me where and how can put the php code

Thanks

Bharat

J
Jane 12/10/2007

Bharat,
add your custom code on the "View as" settings dialog --> Custom on the Visual Editor tab.

Use standart PHP functions like date(), round(), etc.
You can find some examples in the PHP documentation:

http://php.net/manual/en/

B
bharat25 author 12/11/2007

Thanks Jane

i will try it but i have little bit known about php, can u please advise any function for conditional conversion of seconds to minutes only, 1 if user get billed using 60/60 it came out with minutes no sends in their cdr, 2 if user get billed for 30/30 it show only .5 and 3 no change in 1/1 billing.

Bharat

J
Jane 12/11/2007

Bharat,
where do you want to calculate this value?

It's difficult to recommend you sample code without any examples of your tables or real values.