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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:35:00+00:00 2026-05-18T06:35:00+00:00

Here is what I am getting as data: jsonp1290537545248( [{Active:true,EndDate:\/Date(-62135578800000-0500)\/,StartDate:\/Date(1280635200000-0400)\/}] ); $.getJSON(url, {}, function

  • 0

Here is what I am getting as data:

jsonp1290537545248( [{“Active”:true,”EndDate”:”\/Date(-62135578800000-0500)\/”,”StartDate”:”\/Date(1280635200000-0400)\/”}] );

  $.getJSON(url, {},
      function (data) {
          alert(data[0].EndDate);
          alert(Date(data[0].StartDate));
          //alert(data[0].StartDate.getDate());// + "/" + (data[0].StartDate.getMonth() + 1) + "/" + data[0].StartDate.getFullYear()); // alerts: "15/10/2008" 
          //var date = eval(jsonDate.replace(/\/Date\((\d+)\)\//gi, "new Date($1)"));
          alert('dd    ' + new Date(parseInt(data.substr(6)))); 

      });

How do I get in the MM/DD/YYYY format?

  • 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-18T06:35:01+00:00Added an answer on May 18, 2026 at 6:35 am

    I would use a similar regex to what Zain posted, but not use eval() like this (demo):

    var start = parseInt(data.StartDate.replace(/\/Date\((.*?)[+-]\d+\)\//i,"$1"), 10),
        date = new Date( start ),
        fStart = date.getMonth()+1 + '/' + date.getDate() + '/' + date.getFullYear();
    

    And what is that end date? It doesn’t seem to be a difference and if you use that number as a new date you end up with “Sun Dec 31 0000 22:59:59 GMT-0600 (Central Standard Time)”… so I wasn’t sure what to do with that value.

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

Sidebar

Related Questions

so here is my problem i am getting data with getJSON and i made
i have used libxml2.Here when i am getting an XML data as a string
OK So here's the plan. The XML I'm getting data from allows non-numeric text
I'm having trouble getting data from a ResultSet object. Here is my code: String
Here is the scenario: I am getting data from database through web server. Based
Here I am getting the Exception when I am setting the recordsetting in AvAudioRecord.
Please help me out here because im getting kind of confused.. I have a
I need some help in understanding what is happening here .I am getting a
Just getting started with C++ here. I am working on OSX with Eclipse CDT.
After getting a helpful answer here , I have run into yet another problem:

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.