SOAPUI DateFormat error

51,936

Try the Sortable Date/Time Pattern, it works for me

Console.WriteLine(date1.ToString("S", CultureInfo.CreateSpecificCulture("en-US"))); 

IN XML

 <tem:StartDate>2014-01-10T15:51:24</tem:StartDate>
 <tem:EndDate>2018-01-10T15:51:24</tem:EndDate>
Share:
51,936
Benjamin Campos
Author by

Benjamin Campos

Updated on April 08, 2020

Comments

  • Benjamin Campos
    Benjamin Campos about 4 years

    I am new here, sorry if I make any mistake posting my question. I am using SOAPUI to test a web service. Inside the Soap message, I need to add an StartDate and EndDate but I am getting as a error (Input string was not in a correct format) I been trying several DateFormat that I found over the internet by I still getting the same error.

    Here you have the SOAPUI parameters.

    Thanks

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
       <soapenv:Header>
          <tem:Message>
             <!--Optional:-->
             <tem:Value>?</tem:Value>
          </tem:Message>
          <tem:APIKeyHeader>
             <!--Optional:-->
             <tem:Value>cbe40420</tem:Value>
          </tem:APIKeyHeader>
       </soapenv:Header>
       <soapenv:Body>
          <tem:GetTasks>
             <!--Optional:-->
             <tem:PIDs>
                <!--Zero or more repetitions:-->
                <tem:string>2857fd7c-a720</tem:string>
             </tem:PIDs>
             <!--Optional:-->
             <tem:UserID>blue</tem:UserID>
             <!--Optional:-->
             <tem:IDs>
                <!--Zero or more repetitions:-->
                <tem:string>?</tem:string>
             </tem:IDs>
             <!--Optional:-->
             <tem:TaskStatus>true</tem:TaskStatus>
             <tem:StartDate>2008-10-26T21:32:52.12679</tem:StartDate>
             <tem:EndDate>2014-10-26T21:32:52.12679</tem:EndDate>
             <tem:ExtentionDays>true</tem:ExtentionDays>
             <tem:ShowNotReady>false</tem:ShowNotReady>
          </tem:GetTasks>
       </soapenv:Body>
    </soapenv:Envelope>