1

Crete Api using core PHP, i want to get $date value in a variable and convert it into 2021-12-07 10:22:32 date format

server response as below

stdClass Object
(
    [$date] => 2009-04-01T00:00:00.000-0700
)

i tried like below

$publishedDate = (!empty($rows->publishedDate)) ? $rows->publishedDate : "";
print_r($publishedDate->$date);

0 Answers0