You need to sign in to do that
Don't have an account?
Luvara
Rounding Numbers in Visualforce
I'm trying to round a number inside an IF statement, and haven't had any luck. I've seen in other threads that you can't use ROUND inside the "value" element..
Any ideas/help would be greatly appreciated..
Thanks! Chris
<apex:column width="150" > <apex:facet name="header">Visit Length</apex:facet> <apex:outputText value="{!IF(l.Length_of_Stay_in_Seconds__c<60, '{0} seconds', '{0} minutes')}"> <apex:param value="{!IF(l.Length_of_Stay_in_Seconds__c<60, l.Length_of_Stay_in_Seconds__c, l.Length_of_Stay_in_Seconds__c/60)}"/></apex:outputText> </apex:column>
Nevermind... figured it out another way without having to use ROUND...
Just used: {0,number, ##} instead.
All Answers
Nevermind... figured it out another way without having to use ROUND...
Just used: {0,number, ##} instead.
<apex:outputText value="{!IF(p.TimeSinceLastVisit<60, '{0,number, ##} minutes ago', '{0,number, ##} hours ago')}"> <apex:param value="{!IF(p.TimeSinceLastVisit<60, p.TimeSinceLastVisit, p.TimeSinceLastVisit/60)}"/></apex:outputText>
Here you go..
Chris