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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:38:01+00:00 2026-05-19T04:38:01+00:00

When I send a date through JSON from Java to Javascript, it sends something

  • 0

When I send a date through JSON from Java to Javascript, it sends something like this:

var ds = "11:07:47 13/01/2011";

Javascript fails to parse this string into date

var d = new Date(ds);

Any ideas?

  • 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-19T04:38:01+00:00Added an answer on May 19, 2026 at 4:38 am

    You need some JS that parse the String and return the year, month, day, minute,hour, second in strings:

    var hour = ds.split(":")[0],
        minute = ds.split(":")[1],
        last_part = ds.split(":")[2],
        second = second_part.split(" ")[0],
        last_part2 = second_part.split(" ")[1],
        day = last_part2.split("/")[0],
        month =  last_part2.split("/")[1],
        year =  last_part2.split("/")[2];
    

    and then instantiate the Date constructor:

    var d = new Date ( year, month, day, hour, minute, second );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

GWT doesn't serialize Java Date properly. When I tried sending Date created in Javascript
I need to send hundreds of newsletters, but would like to check first if
Other than self.class.send :method, args... , of course. I'd like to make a rather
I want to send email from a Ruby application. Is there a call in
I want to send emails through a web app, for example, reminders of a
I have a date import project in which the clients send ANSI-latin1 encoded files
I'm looking to allow a user to enter a date and time to send
I have a DataGridView bound to a table from a .sdf database through a
I have a TIMESTAMP in the database for pages, so in this format $d=2011-01-03
Here is a sample of the javascript/ajax on PAGE A: var commReq = getXmlHttpRequestObject();

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.