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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:40:36+00:00 2026-05-24T23:40:36+00:00

I got the following date format that I get from an API (Yes I

  • 0

I got the following date format that I get from an API (Yes I tried to get them to change the API… dailywtf story):

\/Date(1310481956000+0200)\/

How can I convert this into a Java Date? (java.util.Date)

This comes from a .NET JSON web service.

  • 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-05-24T23:40:37+00:00Added an answer on May 24, 2026 at 11:40 pm

    Without knowing what the date/time string stands for, let me make a guess.

    The 1310481956000 looks to be milliseconds after epoch, and the +0200 an offset relative to GMT.

    The following code seem to indicate it as well:

    final TimeZone tz = TimeZone.getTimeZone("GMT+0200");
    final Calendar cal = Calendar.getInstance(tz);
    cal.setTimeInMillis(1310481956000L);
    final SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z");
    f.setTimeZone(tz);
    System.out.println(f.format(cal.getTime()));
    

    Prints 2011-07-12 16:45:56 GMT+02:00

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

Sidebar

Related Questions

I've got a database which stores pings from various places in the following format:
I got the following crash report from iTunesconnect. Is the UIActivityIndicatorView bugged? Date/Time: 2009-09-26
I tried installing TurboGears 1.0 on Windows 7 using tgsetup.py. and got following error
I've got the following MySQL query: <?php $sql = SELECT * FROM my_table; $result
I have got a date string which looks like the following: Thu Feb 09
I'm having problem parsing the Date from an input string that is of the
I'm using date picker. I'm trying to change the format of date but I
Got following fields in table: Run Date : 2011-09-25 00:00:00.000 Run Time : 05:00:00
I got following code in an XHTML-document and every browser saysit is malformed :(
I got following error... System.NullReferenceException: Object reference not set to an instance of an

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.