You need to sign in to do that
Don't have an account?
retrieve date value
Hello
can someone help me how to display only the date value
expiration_date__c field is defined as datetime. so it is displaying the value as Sun May 31 19:00:00 GMT 2009.
But i want to display the expiration_date__c value as 5/31/2009
<apex:page controller="Travelling_Home" action="{!init}"> <apex:form > Your expiration date is {!tvtresults.expiration_date__c} </apex:form> </apex:page>
public class Travelling_Home { Travelling__c tvt; public Travelling__c gettvtresults() { return tvt; } public PageReference init() { if(tvt==null) tvt=[select place__c,expiration_date__c from Travelling__c__c where expiration_date__c>=TODAY and USER_ID__c=:UserInfo.getUserId() limit 1]; return null;
} }
The only way is to use the following:
{!DAY(tvtresults.expiration_date__c)}/{!MONTH(tvtresults.expiration_date__c))}/{!YEAR(tvtresults.expiration_date__c)}
All Answers
The only way is to use the following:
{!DAY(tvtresults.expiration_date__c)}/{!MONTH(tvtresults.expiration_date__c))}/{!YEAR(tvtresults.expiration_date__c)}
Sam...Thank you very much....It help me a lot..
Thanks
again