function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Hi All,
I need to convert DateTime field 2011-03-21T11:54:45.000Z to Date Format. March 21, 2011
Thanks,
Krishna
Assuming your date/time field is called 'MyDT__c', you can use the format method as follows:
String formatted=MyDT__c.format('MMMM dd, yyyy');
Hi Bob,
i tried to get Date as March 20,2011 but while saving it showing error as can not have format('String') method.
while saving with My__c.format()- displaying date based on Locale like dd/mm/yyyy.
i want to know is there any way to get date format as 'DD MMM,YYYY'.i.e 20 Mar,2011.
if possibe, Pls can you explain how do i get that date format.
Rgds,
Buss
Assuming your date/time field is called 'MyDT__c', you can use the format method as follows:
All Answers
Assuming your date/time field is called 'MyDT__c', you can use the format method as follows:
Hi Bob,
i tried to get Date as March 20,2011 but while saving it showing error as can not have format('String') method.
while saving with My__c.format()- displaying date based on Locale like dd/mm/yyyy.
i want to know is there any way to get date format as 'DD MMM,YYYY'.i.e 20 Mar,2011.
if possibe, Pls can you explain how do i get that date format.
Rgds,
Buss