[SalesForce] Get only time from Datetime field

I want to display only time value in apex:outputText.Is there any format to display only time.?

Thanks in advance.

Best Answer

You need to use a apex:param for that:

   <apex:outputText value="The formatted time right now is: 
         {0,date,HH:mm:ss}">
       <apex:param value="{!NOW()}" />
   </apex:outputText>

Check this doc: apex:outputText

Related Topic