[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

RSS formatting pubDate element value

Posted on 2009-05-10
4
Medium Priority
?
892 Views
Last Modified: 2013-11-18
I am trying to format pubDate value in MM/DD/YY format in my Javascript. Can anyone give me pointers ?
document.getElementById("chan").innerHTML ="";
	for (var i=0; i<RSS.items.length; i++)
	{	
 
		var item_title = RSS.items[i].title;
		var item_url = RSS.items[i].link;
		var item_date = RSS.items[i].pubDate;
		
		document.getElementById("chan").innerHTML += "<a href ="+ item_url + " target='_blank'>" + item_title +  "</a> " + item_date + "<br>";
	}

Open in new window

0
Comment
Question by:dmanchikalapudi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 

Accepted Solution

by:
dmanchikalapudi earned 0 total points
ID: 24359446
Thank you. I solved this issue ... if anyone is still looking for an answer ... here it is ... I used DateFormat class to parse the pubDate string to a java Date object.



DateFormat df = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz");
Date publishedDate = df.parse(((Item) getChannelItems()[currentIteration]).getPubDate().toString().trim());

Open in new window

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
This article discusses how to create an extensible mechanism for linked drop downs.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
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)
Suggested Courses

649 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