使用PHP的MS Dynamics NAV Web服务的日期格式

时间:2018-05-30 05:32:17

标签: php web-services date soap microsoft-dynamics-nav

我已经为" Start_Date"尝试了2到3种日期格式的可能性。喜欢

  1. 30-05-2018
  2. 2018年5月30日
  3. 30/05/2018
  4. 但我得到了回复

      

    价值" 30-05-2018"无法评估类型日期。

    以下是我的功能

    public function getPriceList($customer_number){
        $url = 'Page/CustomerPrices';
        try {
            $response = new \stdClass();
            $response->status = false;
            $options = [
              'soap_version' => SOAP_1_1,
              'connection_timeout' => 120,
              'login' => env('MICROSOFT_DYNAMICS_NAV_USERNAME', ''),
              'password' => env('MICROSOFT_DYNAMICS_NAV_PASSWORD', ''),
              'exceptions' => true,
            ];
            $soapWsdl = env('MICROSOFT_DYNAMICS_NAV_URI', '').$url;
            $client = new SoapClient($soapWsdl, $options);
            $response->data = $client->ReadMultiple(['filter'=> [],'Start_Date' => "30-05-2018",'Cust_No'=>$customer_number,'Name'=>'Testing','Price_Comments'=>'','setSize'=>'1']);
            $response->status = true;
    
        }catch (Exception $e) {
            $response->data = $e->getMessage();
        }
        return $response;
    }
    

0 个答案:

没有答案