[SELECT Id,(SELECT Id, StepStatus, Comments, OriginalActorId, ActorId, CreatedDate, Actor.Name, OriginalActor.Name FROM Steps ORDER BY CreatedDate DESC) FROM ProcessInstance 
WHERE targetObjectId = :caseId
ORDER BY CreatedDate DESC]

The problem is it is giving out 2015-01-08T07:11:17.000+0000 I Just need 2015-01-08 1/8/2016 11:00 am” i.e “mm/dd/yyyy “ and 12 hour format time

1 Answer 1


You have some options. First you can use Date Functions. It allow you to group the data by date periods using functions like CALENDAR_YEAR:

From Account
Group By CALENDAR_YEAR(CreatedDate)

If you use apex you can use methods of the Datetime Class like format():

Datetime myDT = Datetime.now();
String myDate = myDT.format('MM/dd/yyyy');

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .