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 7736333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:42:36+00:00 2026-06-01T07:42:36+00:00

I want to get the CreateDate value from xml file the xml file is

  • 0

I want to get the CreateDate value from xml file
the xml file is like this way.

<d:CreateDate m:type="Edm.DateTime">2012-03-18T15:11:30.403</d:CreateDate>

I created JSONObject as

JSONObject json=new WCFServices().getWhatsNew();//i get the json object WCFServices class.
JSONArray whatsnew= json.getJSONArray("d");
String CreateDate= c.getString("CreateDate");

if i try to print the value it gives me output as:

 /Date(1330041600000)/

I want to get the value as like 2012-03-18T15:11:30.403
how to get it ?

  • 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-01T07:42:36+00:00Added an answer on June 1, 2026 at 7:42 am

    I think your output is in epoch date format. So you need to convert it to normal date time. Try this for it..

    public String normal_date_time(String epoch_date)
        {
          try
          {
             long epoch = Long.parseLong( epoch_date );
    
             String dateFormat = "dd/MM/yyyy HH:mm:ss.SSS";
             SimpleDateFormat formatter = new SimpleDateFormat(dateFormat);     
             Calendar calendar = Calendar.getInstance();
             calendar.setTimeInMillis(epoch);
             String formated_date =  formatter.format(calendar.getTime()); 
             Log.d("Date", formated_date);
             return formated_date;
          }
          catch (Exception e) 
          {
            // TODO: handle exception
              return null;
          }
    

    You can find more about DateFormat by following links, It will help you to retrieve output in different formats.

    http://developer.android.com/reference/java/text/SimpleDateFormat.html

    http://developer.android.com/reference/android/text/format/DateFormat.html

    Hope this will help you..And don’t forget to accept this if it help you.

    Thanks…

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

Sidebar

Related Questions

What I want: get a xml from the AppData to use What I code
i want query a file xml with linq, i want get all descendat of
I want to get 100 and example from this string ?connect:100/username:example/ I searched in
I want to get the absolute days away a datetime is from today. For
I want to get the value of productId and addressTypeID in this array: Array
I want get as much as possible from Redis + Hiredis + libevent. I'm
Basically I want get data I already have accessed from javascript and passing it
i want to get the Id from GridView in RowDeleting Event , I tried
My database table is something like this: #tblMain ID Value CreatedDate ________________________________________ 1 25
I want to insert data from excel sheet to datatable and this was working

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.