If DateTime Object Is Null

前端 未结 2 607

I am returning some search results after form submit. All is working fine, until I get to a field that is SMALLDATETIME and allows NULL. At least one of the returned rows ha

2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-12 06:04

    ".(
       is_null($search_results_option->HardwareAssetLastDiscoveryScanDate) ? '' : 
           date_format($search_results_option->HardwareAssetLastDiscoveryScanDate,
            "d/m/Y H:i")
        )
     ."";
    

提交回复
热议问题