Date format for MS Dynamics NAV web services with PHP

1.3k Views Asked by At

I have tried 2 to 3 possibilities of date formats for the "Start_Date" like

  1. 30-05-2018
  2. 05-30-2018
  3. 30/05/2018

but I am getting the response as

The value "30-05-2018" can't be evaluated into type Date.

The below is my function

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

There are 0 best solutions below