Skip to main content

Rocket® Zeke™ users often find themselves grappling with date requirements that shift based on specific conditions like perpetual tasks, year-over-year calendar changes, or relative date formatting. That’s where date manipulation variables come into play.

With Zeke’s robust system of date manipulation variables, you handle relative dates and date formats seamlessly, all while ensuring operations remain precise and efficient. This guide will walk you through what Date Manipulation Variables are, how to use them, and which best practices can optimize your workflows.

What are date manipulation variables?

Date Manipulation Variables in Zeke are powerful tools that allow you to dynamically calculate relative dates based on predefined parameters. Schedule events, run automated reports, or kickstart workflows with variables that provide flexibility by using relative selectors for custom date formatting.

Key features

  • Versatile formatting - Customize dates with dynamic variables to adapt to various scenarios
  • Relative date calculations - Shift dates relative to the target date with ease
  • Annual adjustments - Create rules for varying calendars by defining separate years to match year-over-year changes
  • Effortless perpetual scheduling - Avoid manual updates with automation for recurring dates

Why You Need a Defined Calendar

If your calendar details vary year-to-year, it’s essential to define separate calendars for each year. Why? Zeke needs these calendars to resolve Date Manipulation Variables in forward-looking or backward-looking operations. Without a year-specific definition, mismatched data could disrupt workflows.

📌 Pro tip: Don’t forget to define one year before and one year after your target year to ensure continuity in calculations. This step is unnecessary if you rely on perpetual scheduling.


The anatomy of date manipulation variables

Date manipulation variables in Zeke come in a specific format. Here’s a breakdown of how they’re structured:

%dd[%dd ...]fffff

  • `%`: Denotes the beginning of the variable.
  • `dd`: The date selector code, which determines the operation to be performed. Multiple selectors build on the result of the previous operation.
  • `fffff`: Specifies the final date format outcome.

Types of date selector codes (dd)

Each date selector code serves a specific function. Here are some of the most common codes and their purposes:

  1. `+n` - Add days

Adds a specific number of days (`n`) to the target date. For instance, `%+7MMddyyyy` calculates the date one week after the target date in MM/dd/yyyy format.

  1. `-n` - Subtract days

Subtracts a specific number of days (`n`). Use `%2MMddyyyy` to find two days prior to the defined target date.

  1. `w` - Forward to weekday

Moves the target date forward to the next occurrence of a specific weekday. Example `%w5MMddyyyy` pushes the date to the upcoming Friday.

  1. `m` - Add months

Adjusts the date by adding one or more months to the target date. `%m+2yyyyMMdd` gives the date two months from the target date in yyyy/MM/dd format.

  1. `1st` or `nth` - Specific day of month

Selects the first or nth occurrence of a weekday within the month. `%1TueMMddyyyy` selects the first Tuesday of the current month.


Common use cases for date manipulation variables

1. Scheduling recurring tasks

Imagine you handle payroll generation that’s processed on the 15th of every month or the next weekday if the 15th falls on a weekend. Using the `w` selector code, you could create an automated schedule to always account for the proper business day.

Example variable:

`%15wMMddyyyy` – Returns the next weekday after the 15th of the month.

2. Quarterly reporting

For organizations generating quarterly reports, you can dynamically calculate the last day of each quarter. By embedding these variables in your automation workflows, reports are triggered without manual date input.

Example variable:

`%@+3mLastMMddyyyy` – Calculates the last day of the quarter three months ahead.

3. Contingency planning for holidays

When tasks need to skip holidays or adjust around them, Date Manipulation Variables paired with yearly calendars ensure accuracy. Define a calendar that excludes public holidays, and your scheduling logic will never require manual adjustments.


Best practices for implementing date manipulation variables

1. Always define year-dependent calendars

While perpetual scheduling removes the need for adjustments, year-specific scheduling requires clearly defined calendars to enable accurate calculations. Ensure you include one year prior and one year after for a seamless rollover.

2. Validate formats regularly

Always double-check the `fffff` formatting to match your output requirements (`MMddyyyy`, `yyyyMMdd`, etc.). A wrong format could break your downstream workflows.

3. Test in a sandbox

Experiment with different variable combinations in a sandbox environment before deploying them in production. This way, you can catch errors and unexpected outputs early.

4. Incorporate documentation

Maintain clear documentation of the Date Manipulation Variables implemented in your processes. Having this reference speeds up troubleshooting and makes onboarding easier for new team members.


Unlock efficiency with Zeke's date manipulation variables

Date Manipulation Variables dramatically enhance the flexibility and precision of your scheduling workflows in Zeke. From managing recurring events to dynamically adjusting around changing calendars, these tools are key to saving time and reducing errors.

Take control of your time, leverage the power of date manipulation variables in Zeke, and watch your scheduling processes transform. And remember, with precise calendars, clear formatting, and smart testing practices, you’ll unlock their full potential.

Need more insights or hands-on help? Comment below!