convert pubDate to timestamp rss in yql

577 Views Asked by At

I have a YQL query where I am accessing data from an RSS feed. I want to get the pubDate for the articles in the feed, but I don't want it to be in (for example) this format:

Fri, 30 Nov 2012 14:19:55 +0000

I would prefer it to be in this format:

11/30/2012

Is there a simple function within YQL itself that would let me do this? Just to be clear, I would prefer to have a YQL-only solution, without having to use PHP or javascript or anything.

1

There are 1 best solutions below

0
On

Check this link. In particular look at y.date.getOffsetFromEpochInMillis(time_format) function. This gives you the epoch in milliseconds.

After you get that, inside your YQL open data table definition, massage this timestamp to mm/dd/yyyy format as listed in the question Convert a Unix timestamp to time in JavaScript