I am using braintree payments and in a place I am calling a transaction details from it. It returns with recursive arrays and a lot of data from which I need only a few values. For example, I want to get subscription start and end time. If write this code
From there it depends on what your needs are. You could truncate the string to 10 characters or you could do a double convert to get any format you want, using strtotime() to get a UNIX timestamp and then using the date() function to reformat.
You have a MySQL format date/time, so that's valid to use with strtotime() as is. So you just have
$formatted_date = date('l jS \of F Y', strtotime($transaction->subscriptionDetails->_attributes['billingPeriodEndDate']->date));
to print a date like "Saturday, 27th of July, 2012" should you be so moved.