Knowledge Base Article
Thanks! Having a script to set the "to" date to the current date is really helpful for my purposes. However, I need help with the "from" date. Your examples seem to only work for a rolling "from" date (e.g. always X days prior to the current date), but I was hoping for a way to set an anchor for a specific time period. It would still be dynamic, in the sense that it'll change whenever the time period shifts, but within that time period it would be static. Know what I mean? For instance, I'd like to set the "from" date to always be the beginning of the current year (i.e. Jan 1st), or other dates like the start of the current quarter/month/etc? I figured out how to specify a purely static date like "1/1/24" but obviously that would need to be updated manually, which isn't ideal.