无法解析日期时间类型

4

我正在尝试使用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'

我该如何解决这个问题?
1个回答

4

虽然我从未使用过bluedart pincode master api,但我确定问题是日期格式不符合标准的YYYY-MM-DD格式。

尝试改为:

2016-06-04


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接