2 Replies Latest reply: May 3, 2012 5:39 PM by Karthikeyan Krishnan RSS

String was not recognized as a valid DateTime (SAP_BASIS 702)

Karthikeyan Krishnan
Currently Being Moderated

Hello guys,


We could consume a web service in .Net and get back the results sucessfully if there are no date fields in the output parameters. The issue is when there is a date field in the output parameters with NULL value, the web service is throwing error "String was not recognized as a valid DateTime". Even though the RFC is has no value in the date fields the web service shows '0000-00-00' as date format. And there are no trace of this issue in SOAMANAGER or SRT_UTIL. We identified that the DATE data types are not convereted to strings in the web service (it does convert all data types to strings in SAP_BASIS 701) and causing issues. Take a look at the diffrence in WSDL lines for date fields in 701 and 702.


Did anyone faced this type of issue? How to overcome this?


SAP_BASIS 702 - Date field


- <xsd:simpleType name="date">

- <xsd:restriction base="xsd:date">

<xsd:pattern value="[0-9]{4}-[0-9]{2}-[0-9]{2}" />




SAP_BASIS 701 - Date field


- <xsd:simpleType name="date">

- <xsd:restriction base="xsd:string">

<xsd:maxLength value="10" />

<xsd:pattern value="\d\d\d\d-\d\d-\d\d" />