Offset Date/Time

The Offset date/time block offsets a date and time value by a specified number of years, months, days, hours, minutes, or seconds. For example, if the original date and time is 01.01.2017 10:00:05 and the offset is 1 year and 2 minutes with Offset method set to Add, the result is 01.01.2018 10:02:05.

This block has no green input or output connectors in the header because it is not explicitly executed. It is used to change a date and time value and deliver the result to other building blocks.

Fully expanded, the Offset date/time block shows the following properties:

image-20251222-154821.png

Note: The screenshot on this page uses the Elegance Design, introduced in 2025.3. If you are using an earlier version, your layout may look different.

Quick-start

  1. Drag Offset date/time onto the canvas.

  2. Connect the block in the flow and specify Date/time to offset, Offset date/time, and Offset method.

  3. Run the flow when it’s ready.

Building block parameters

Parameters
  • Block header: Shows the current name of the Offset date/time block. You can rename it by double-clicking the header and typing a new title.

  • Date/time to offset: Specifies the original date and time value to change. You can enter it as separate date and time values, and you can further expand it into year, month, day, and hour, minute, second fields.

  • Offset date/time: Specifies the offset value to apply. You can enter it as separate date and time values, and you can further expand it into year, month, day, and hour, minute, second fields.

  • Offset method: Selects how the offset is applied. The available options are:

    • Add: Adds the specified offset values to the original date and time.

    • Subtract: Subtracts the specified offset values from the original date and time.

    • Set: Sets one or more parts of the original date and time to specific values, for example setting the year to 2020.

  • Result date/time:
    Provides the resulting date and time value after applying the offset operation.

Resources

Topic

Description

Flows FAQ

Common questions about creating, running, and managing flows in Leapwork.

Flows Troubleshooting

Guidelines and solutions for identifying and fixing issues that occur when building or running flows in Leapwork.