I am trying to add a past date on an automated report that runs every thursday. I am needing to add the previous saturday's date to the subject line. So every thursday that it runs it needs to show "Report Name" - Previous Saturday's date. For example, this weeks report should have the subject: Report Name - 4/29/23. Currently I have the logic below in place but it only gives me the current date and not a past date.
"Report Name "+datetimeformat(DateTimeToday(),"%m-%d-%y")
Solved! Go to Solution.
Hey @czjames87, if you're running this every Thursday then you'll just want to take away 5 days each time the workflow runs, using the DateTimeAdd() function:
"Report Name "+datetimeformat(
DateTimeAdd(datetimetoday(),-5,'day')
,"%m-%d-%y")
Hi @czjames87 and @DataNath
You can adjust for running on any day of the week by replacing the -3 with -(tonumber(DateTimeFormat(DateTimeToday(),"%w"))+1)
"Report Name "+datetimeformat(
DateTimeAdd(datetimetoday(),-(tonumber(DateTimeFormat(DateTimeToday(),"%w"))+1),'day'),"%m-%d-%y")
that did it thank you!
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
5 |