1

Can anyone advise how can I create an AMPSCRIPT that gives me today - 7? I am basically want to issue each Sunday a graph that shows the stat a user had in the last 5 weeks. so I need above each graph to show today (Sunday), last week (today - 7), two weeks ago (today - 14) and so on. Can anyone advise? Thanks :)

1 Answer 1

3

You could do something like this:

Today: %%=formatDate(now(1),"YYYY-MM-DD")=%%
Today - 7: %%=formatDate(dateadd(now(1),-7,"D"),"YYYY-MM-DD")=%%
Today - 14: %%=formatDate(dateadd(now(1),-14,"D"),"YYYY-MM-DD")=%%

Reference:

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .