Solved

How do I convert dd-mmm-yyyy (14-Sep-2004) into javascript date format?

Posted on 2004-09-14
3
1,269 Views
Last Modified: 2012-05-05
How do I convert dd-mmm-yyyy (14-Sep-2004) into javascript date format?

I'd also like to be able to deal with the following kind of date string 1-Sep-2004 (where we unfortunately encounter d-mmm-yyyy rather than the desired dd-mmm-yyyy.
0
Comment
Question by:GessWurker
  • 2
3 Comments
 
LVL 9

Accepted Solution

by:
cwolves earned 500 total points
ID: 12057662
new Date('14-sep-2004'.replace('-', ' '));

in other words, use spaces instead of dashes
0
 

Author Comment

by:GessWurker
ID: 12057710
Perfect! Thanks!
0
 
LVL 9

Expert Comment

by:cwolves
ID: 12057725
yep :-)  and ty
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

775 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question