You need to sign in to do that
Don't have an account?

Display data
Hi
I have created a custom object with 4 fields out of 1 is datetime field. I need to display the records from this object to a VF page. But the condition is that only the time from the datetime field should be displayed. I have done the code to get only time from the datetime field but I am not able to display the time on the Vf page using datatable or pageblocktable.
Can anybody help me to solve this problem.
Thanks
Anu
Inside the pageblock table use the below approach to display the time
<apex:outputText value="{0,TIME,HH:mm:ss z}">
<apex:param value="{!NOW()}"/>
</apex:outputText>
Replace the param value with the records DateTime field
All Answers
Inside the pageblock table use the below approach to display the time
<apex:outputText value="{0,TIME,HH:mm:ss z}">
<apex:param value="{!NOW()}"/>
</apex:outputText>
Replace the param value with the records DateTime field
thanks Gunners_23.