Convert mssql datetime object to PHP string

后端 未结 9 578
春和景丽
春和景丽 2021-02-05 12:41

I\'m grabbing some information from a database and the record is in an MSSQL DateTime format, when I return it, it shows in my array as follows:

[arrayItem] =>         


        
9条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-05 13:28

    You should access them like below. the associative index arrayItem contains an object which have some properties.

    $array['arrayItem']->date;
    $array['arrayItem']->timezone_type;
    

提交回复
热议问题