I've got an email that uses the following to parse an RSS feed and print the last 5 blog posts. Now they want to print all blog posts from the past week. Any help?
%%[Var @xml, @titles, @title, @descs,@pubdas,@pubda, @desc, @links, @link, @cnt
Set @xml = ContentAreaByName("my contents\RSSParsej") /* This line specifies the content area from which the RSS content will be pulled for the email message. */
Set @titles = BuildRowsetFromXML(@xml,"//item/title",1)
Set @descs = BuildRowsetFromXML(@xml,"//item/description",1)
Set @pubdas = BuildRowsetFromXML(@xml,"//item/pubDate",1)
Set @links = BuildRowsetFromXML(@xml,"//item/link",1)
If RowCount(@titles) > 5 THEN
SET @rows = 5
ELSE
SET @rows = RowCount(@titles)
ENDIF
IF @rows >= 1 THEN
for @cnt = 1 to @rows do
Set @title = Field(Row(@titles,@cnt),"Value")
Set @pubda = Field(Row(@pubdas,@cnt), "Value")
Set @desc = Field(Row(@descs,@cnt), "Value")
Set @link = Field(Row(@links,@cnt), "Value") ]%%
<div style="border-bottom: 1px solid #CBCAD2; padding-bottom:5px; padding-top:3px;">
<a style="text-decoration:none; color: #000000; font-weight: bold; font-size: 16px; font-family: Arial, Helvetica, sans-serif;" href="%%=RedirectTo(@link)=%%" alias="%%=v(@title)="%%" title="%%=v(@title)=%%">%%=v(@title)=%%</a><span style=" font-size:11px; text-decoration:none; font-weight: normal;"> | %%=Format(@pubda, "MMMM d, yyyy")=%%</span><br/>
%%=v(@desc)=%%
</div>
%%[
NEXT @cnt
ENDIF
]%%