search

Home  >  Q&A  >  body text

The datetime type is in mssql and cannot be displayed.

[Pre-billing date] => DateTime Object ( [date] => 2019-03-17 00:00:00.000000 [timezone_type] => 3 [timezone] => PRC )

[Advance receipt date] => DateTime Object ( [date] => 2019-04-01 00:00:00.000000 [timezone_type] => 3 [timezone] => PRC )

Judgment For the date format, use
echo "{$key} -> ".date_format($val,"Y-m-d") ." <br />";
Still not working. Please tell me how to convert the format. Thank you.

stock2stock22061 days ago1135

reply all(2)I'll reply

  • stock2

    stock22019-05-05 11:02:46

    Thank you for your reply. Theoretically, few people use mssql. But there should be a solution for this type. I finally converted it into a string when querying in mssql. It was OK. If I used * it would not work.

    reply
    0
  • 失去过去

    失去过去2019-05-05 10:36:58

    In mysql, few people use datetime data. They all directly pass the timestamp of char or int, and use date() when reading.

    reply
    0
  • Cancelreply