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

  • Home
  • SEARCH
  • 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 8433525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:24:35+00:00 2026-06-10T06:24:35+00:00

Possible Duplicate: Help parsing ISO 8601 date in Javascript I think this should be

  • 0

Possible Duplicate:
Help parsing ISO 8601 date in Javascript

I think this should be very simple but turned out amazingly tedious.

From WEB API, I received selected object via ajax, and one of its properties is InspectionDate datetime string such as 2012-05-14T00:00:00

In javascript, I use following code to have correct date object

selected.JsInspectionDate = new Date(selected.InspectionDate);

But JsInspectionDate shows

2012/05/14 00:00 in firefox, 
2012/05/13 20:00 in chrome and 
NAN in IE9

for 2012-05-14T00:00:00.

Could someone tell me why this problem occurs? And how to fix this issue? I just want to show as in firefox for all browsers.

  • 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-10T06:24:37+00:00Added an answer on June 10, 2026 at 6:24 am

    Do this:

    new Date(selected.InspectionDate + "Z")
    

    Rationale: Your dates are in ISO 8601 form. Timezone designators like "Z", a very short one for UTC, work.

    Note! IE might not understand ISO 8601 dates. All bets are off. In this case, better use datejs.

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

Sidebar

Related Questions

Possible Duplicate: Help parsing ISO 8601 date in Javascript I have a set of
Possible Duplicate: Absolute path & Relative Path This is a very basic question, but
Possible Duplicate: JavaScript: formatting number with exactly two decimals Can some one please help
Possible Duplicate: How does this CSS triangle shape work? Please help me i need
Possible Duplicate: preg_match() Unknown modifier '[' help I am trying to match this pattern
Possible Duplicate: R help page as object I can do temp <- help('ls') But
Possible Duplicate: Need help solving Project Euler problem 200 Similar to this question Project
Possible Duplicate: Linq help - Sql trace returns result, but datacontext returning null Question
Possible Duplicate: web2py url validator would you help me on this code? from urllib2
Possible Duplicate: JSON Parsing in Android Android Json Parsing Tutorial any body please help

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.