Hi people I have some code to retireve dates from a database, see below.
The issue is i can not find a way to change the output to d,m,Y instead of what the data comes back from database.
Any help with this would be much appriciated.
The transaction date is getting the invoice date created back as 2020-04-01 etc, but how to swap this code?, I dont think i can do it within the array.
$statement_transactions = array();
$client_total_balance = $client_opening_balance;
foreach ($client_invoices as $invoice_entry) {
$transaction = [
'transaction_type' => self::TRANSACTION_TYPE_INVOICE,
'transaction_date' => $invoice_entry->invoice_date_created,
'transaction_amount' => $invoice_entry->invoice_total,
'invoice_id' => $invoice_entry->invoice_id,
'client_id' => $invoice_entry->client_id,
'user_company' => $invoice_entry->user_company,
'invoice_amount_id' => $invoice_entry->invoice_amount_id,
'invoice_item_subtotal' => $invoice_entry->invoice_item_subtotal,
'invoice_item_tax_total' => $invoice_entry->invoice_item_tax_total,
'invoice_total' => $invoice_entry->invoice_total,
'invoice_sign' => $invoice_entry->invoice_sign,
'invoice_status_id' => $invoice_entry->invoice_status_id,
'invoice_date_created' => $invoice_entry->invoice_date_created,
'invoice_time_created' => $invoice_entry->invoice_time_created,
'invoice_number' => $invoice_entry->invoice_number,
];
$client_total_balance += $invoice_entry->invoice_total;
$statement_transactions[] = $transaction;
}