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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:12:52+00:00 2026-05-23T12:12:52+00:00

I am grabbing a node from XML that returns the date like this :

  • 0

I am grabbing a node from XML that returns the date like this :

2011-06-24T03:00:00

If I try to run new Date I am getting a NaN error.

 var shippedDate = new Date($j(this).find("Shipment").find("Date").text())

 $j("#result").append(shippedDate.getDate() + "/" + shippedDate.getMonth() + "/" + shippedDate.getFullYear() );

I am thinking I need to use a regular expression to grab everything before the T and drop the rest then it will work ?

Can someone please show me what that regex would look like or if there is another solution?

  • 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-23T12:12:52+00:00Added an answer on May 23, 2026 at 12:12 pm

    I think there might be an issue with how you are calling $j(this) because when I strip it all out, it works:

    var shippedDate = new Date("2011-06-24T03:00:00");
    
     $("#result").append(shippedDate.getDate() + "/" + shippedDate.getMonth() + "/" + shippedDate.getFullYear() );
    

    http://jsfiddle.net/jasongennaro/Ry9u8/

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

Sidebar

Related Questions

I have a xsl file that is grabbing variables from xml and they seem
I'm grabbing some data from a database that has a stored date value, and
I have this method for grabbing the file name from a string URI. What
When I am grabbing data from my table that require permissions, should all the
I'm having some problem's grabbing a response stream from a request that returning status
I have jquery grabbing an id from something else (image) and I would like
I am grabbing posts from the WordPress database using this piece of code: $query
So I am grabbing this XML data, and parsing it within the success function
I am grabbing a JSON response from AJAX request, the output is something like
so I have been having trouble with grabbing information from a device that is

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.