function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sarthak Bajaj 14Sarthak Bajaj 14 

Call Duration In seconds into Minutes in Number or Time format

Hi,
Is there a way by which i  can convert CallDurationInSeconds field into minutes provided the new field should not be in text format.
I have tried with
DATETIMEVALUE(TEXT( FLOOR(MOD( CallDurationInSeconds ,3600)/60)) + ":" + TEXT(MOD(MOD( CallDurationInSeconds ,3600),60)))

But it does not work,
Also i have tried with number formula type 
CallDurationInSeconds/60

which gives me a result of 1.10 when i have 66 seconds..But i want 1:06 for 66 seconds
Please help..!
Dhanya NDhanya N
Hi Sarthik,
Try this formula:
IF((MOD(CallDurationInSeconds/60,1)*60) > 10,
		TEXT(FLOOR( CallDurationInSeconds/60)) + ":" + TEXT(FLOOR(MOD( CallDurationInSeconds/60,1)*60) ),
		TEXT(FLOOR( CallDurationInSeconds/60)) + ":0" + TEXT(FLOOR(MOD( CallDurationInSeconds/60,1)*60) )
	)
Let me know if it works.

Thanks,
Dhanya
 
Sarthak Bajaj 14Sarthak Bajaj 14
Thanks for your reply Dhanya,
It is giving me a syntax error
User-added image
Dhanya NDhanya N
That may be because of double quote. Remove it and add double quote again and check.
Dhanya NDhanya N
Check this formula:
IF((MOD(CallDurationInSeconds/60,1)*60) > 10,
TEXT(FLOOR( CallDurationInSeconds/60)) + ":" + TEXT(FLOOR(MOD( CallDurationInSeconds/60,1)*60) ),
TEXT(FLOOR( CallDurationInSeconds/60)) + ":0" + TEXT(FLOOR(MOD( CallDurationInSeconds/60,1)*60) ))

 
Sarthak Bajaj 14Sarthak Bajaj 14
Dhanya,
Yes, the mm:ss format is now fine..
But i want to see this in number format or time format.As i want this field for calculating average time for which text filed wont solve my problem.
Sarthak Bajaj 14Sarthak Bajaj 14
By making few changes in ur code provided, i came up with this:
F((MOD(CallDurationInSeconds/60,1)*60) > 10, 
VALUE(TEXT(FLOOR( CallDurationInSeconds/60)) + "." + TEXT(FLOOR(MOD( CallDurationInSeconds/60,1)*60) )), 
VALUE(TEXT(FLOOR( CallDurationInSeconds/60)) + ".0" + TEXT(FLOOR(MOD( CallDurationInSeconds/60,1)*60) )) 
)

which is now in number format.
Is there any way by which it can be converted into time format (Alreadt tried with DATETIMEVALUE-not working)