I have a few dates in my JSON file and I wonder how I can rewrite the output of them.
Current date: 2018-03-04T23:40:46.94 How it should be: 04/03/2018
Current JSON:
{
"SKU": "PQ-70-7EF",
"ParentSKU": null,
"Category": "Alarm clocks",
"EAN": "4971850420019",
"Title": "Casio Wakeup timers",
"Description": "Casio Wakeup timers",
"Brand": "CASIO",
"RRP": 56,
"Price": 26.1,
"PriceUpdateUTC": null,
"Stock": 0,
"StockUpdateUTC": "2018-03-04T23:40:46.94",
"Images": [
{
"ImageSort": null,
"ImageURL": "https://uwt.blob.core.windows.net/dsales/partimage/pq-70-7ef_kniwoz.jpg",
"IsDefault": true
}
]
}
Current script:
foreach ($data as $key => $entry) {
$data[$key]['StockUpdateUTC'] = date('d/m/Y');
}
The above script is changing all dates to today's date. Thanks for the help.
Regards Ely