I am developing an rss app and I face following problem:
- pubDate - is in a wrong time format and i need to change that format. I need to show date and time in my zone. How can be achieve this?
I am developing an rss app and I face following problem:
JavaScript, in mapping.
Hi I am a newbie to Java script
Could you supply a sample script
Many Thanks
Hi!
Here is the sample code you can try:codealert('Hello world');/code
Find more here:
http://cs.brown.edu/courses/bridge/19...
Thanks for the info
I was looking for a sample script how to parse date format for rss , but came right
var Helpers = {
parsepubDate: function(value) {
var date = new Date(value);
var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
Code: Select all
return date.getDate() + " " + months[date.getMonth()]+ " " + date.getFullYear();
} };
If you want to change TimeZone for any Mapping parameter you would need to add JavaScript in mapping:
codevar pubDate = new Date(value);
var offset = -9;
//Convert date to UTC
var utc = pubDate.getTime() + (pubDate.getTimezoneOffset() * 60000);
// create new Date object for different city
// using supplied offset
newDate = new Date(utc + (3600000*offset));
// return time as a string
return newDate().toString();/code
Change offset = -9 to time zone value that you need.
This might be helpful: http://www.webdevelopersnotes.com/tip...
Thanx will give that a try
you conducted a webinar on database services, i created the same, but the problem is want it in the dd/mm/yyy hh:mm AM/PM format and +5:30 time zone. I'dont know java so, could you please give me an exact script that'll work in the mapping 'edit js' ?