Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8424059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:53:15+00:00 2026-06-10T03:53:15+00:00

I have create a Web Service which returns an array of elements like these:

  • 0

I have create a Web Service which returns an array of elements like these:

<Service>
    <id>string</id>
    <description>string</description>
    <last_change_date>dateTime</last_change_date>
</Service>

I am consuming this Web Service from Android device, and I’m using Ksoap2 package. When I receive SoapObject from Web Service using the method:

SoapObject response = (SoapObject)envelope.getResponse();

I usually get the content of response using this code:

String str = (String)response.getProperty(index).toString();

And this, normally works good!
But, for getting last_change_date (type dateTime retrieves from datetime field in a db on SQL Server) I can’t use the same method.

So, I’m looking for a mechanism for convert dateTime in any date format (Date or Calendar) in Android.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T03:53:16+00:00Added an answer on June 10, 2026 at 3:53 am

    Yes, you can still get the value of the parameter with that method. What you then have to do is parse the string into a Date object.

    E.g. define the format with:

    private static final SimpleDateFormat httpHeaderDateFormatter =
        new SimpleDateFormat("EEE, dd MMM yyyy hh:mm:ss z", Locale.US);
    

    And implement a parsing method like this:

    private Date parseLastModified(String lastModified) {
        Date date = null;
        if (lastModified != null && lastModified.length() > 0) {
            try {
                date = httpHeaderDateFormatter.parse(lastModified);
            } catch (ParseException e) {
                // otherwise we just leave it empty
            }
        }
        return date;
    }
    

    Of course you have to adapt it to whatever format you get from the server and whatever logic you want to have e.g. when there is no value..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web service which returns a string representing an Xml file. The
I would like to create a service which returns a simple string. So far
I have created a web service which returns some data and am trying to
I have a web service method in which I create a particular type of
I have an existing web service that returns XML responses and I would like
I have been given the task of calling a web service which returns an
I use KSOAP2 library, and web-service returns me string array: <GetChanelResult> <string> string </string>
I have created a web service which is saving some data into to db.
I have created a web service which takes a username and password as parameters
I have created a RESTful PHP web service using Lithium which contains comments, each

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.