How it works
- Set the starting date (empty means now), how many, and the unit, from seconds to years.
- Calendar units work in this computer's time zone, so going back a day keeps the local time of day.
- Months and years must be whole numbers; going back a month from March 31 lands on the last day of February.
Routines that use it
Clear old downloads
Get the date 30 days ago and, while going through List files, recycle anything older than it.
Last week's report name
Subtract 7 days, format it, and open the matching file with Open file or folder.
Yesterday's folder
Subtract 1 day and zip that day's folder with Zip files.
Settings
| Setting | What it does |
|---|---|
| Date | The date to start from. Keep empty for now. |
| Amount | How many. |
| Unit | Of what. |
Good to know
- Months and years only take whole numbers.
Questions
- How do I get yesterday's date in a routine?
- Use Subtract from date with the date empty, amount 1 and unit days, then Format date to write it as text.
- What is March 31 minus one month?
- The last day of February. The step keeps month ends on the month's last day.