Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/260.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/tfs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 无法分析类型datetime_Php_Datetime_Soap - Fatal编程技术网

Php 无法分析类型datetime

Php 无法分析类型datetime,php,datetime,soap,Php,Datetime,Soap,我尝试使用soap客户端调用bluedart pincode主api,但在传递参数后,它会给出错误 请求参数- $params = array( 'lastSynchDate' => '06-04-2016', 'Profile' => array( 'Api_type' => 'S', 'LicenceKey'=>

我尝试使用soap客户端调用bluedart pincode主api,但在传递参数后,它会给出错误

请求参数-

$params = array(
            'lastSynchDate' => '06-04-2016',
            'Profile' =>
                array(
                    'Api_type' => 'S',
                    'LicenceKey'=>$licencekey,
                    'LoginID'=>$loginid,
                    'Version'=>'1.3'
                )
        );
响应错误-

The formatter threw an exception while trying to deserialize the message:

There was an error while trying to deserialize parameter http://tempuri.org/:lastSynchDate.
The InnerException message was 'There was an error deserializing the object of type System.DateTime.
The value '06-04-2016' cannot be parsed as the type 'DateTime'

如何解决此问题?

虽然我从未使用过
bluedart pincode主api
,但我确信这是因为日期不是标准的
YYYY-MM-DD
格式

而不是

06-04-2016

试一试

2016-06-04