---
schema_version: "1"
id: c16746ba2c31fe81371f2ca61e17a9c71edd0a2b8a385ebc97533af6403a6c00
title: Generate and Modify Date and Time
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/rpa-builder/latest/toolbox-variable-handling-generate-and-modify-date-and-time.md
canonical_url: https://docs.mulesoft.com/rpa-builder/latest/toolbox-variable-handling-generate-and-modify-date-and-time
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 8c8857ec91e6088b15cf4ea5e67df3f7e606507bb97fbf71e495322d05ff80f0
description: MuleSoft Documentation Site
release: "6.7"
latest: true
---
---
product: RPA Builder
version: 6.7
is-latest-version: true
---

# Generate and Modify Date and Time

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Use _Generate date and time_ to create a configurable timestamp. Select a country-specific style for
the timestamp from the selection of format templates or arrange the available time components as
required, e.g. day, month, and hour. You can specify the timestamp as a specific time in the future
or past, or use the current system time. It is also possible to incorporate a time offset in days,
hours, minutes, and seconds. _Generate date and time_ creates a timestamp that is available in
several variables, which you can further process in other action steps.

## Properties

- **Generate Date and Time Settings**

  _Generate date and time_ incorporates the specified values into the calculation of the selected
  time stamp (time offset). This action step supports positive and negative numbers. The default
  value is 0 in each case.

- **Calendar week setting**

  Specify either Monday or Sunday as the starting day for the week.

- **Days to Add**

  Number of days to add.

- **Generate day and time mode**

  Select whether to use the **Current system date and time**, **Custom date and time**, or
  **Generated date and time from given variables**. The time offsets from the **Years to add**,
  **Months to add**, **Weeks to add**, **Days to add**, **Hours to add**, **Minutes to add**,
  **Seconds to add** fields apply for the calculation in all cases.

- **Hours to add**

  Number of hours to add.

- **Minutes to add**

  Number of minutes to add.

- **Months to add**

  Number of months to add.

- **Output language culture (for the day of the week)**

  Specify the output language to use for the days of the week.

- **Override activated**

  Enables overriding workday settings.

- **Override to day**

  Specify the day to override with.

- **Override to first or last**

  Specify either the first or last day of the given period (for example, last day of the month).

- **Seconds to add**

  Number of seconds to add.

- **Start workday of week**

  Specify the starting workday of the week.

- **Weeks to add**

  Number of weeks to add.

- **Workdays setting**

  Select between a five-day or six-day workweek.

- **Years to add**

  Number of years to add.

## Variables

The following variables relate to the configurable timestamp generated after applying any time
offset. _Generate date and time_ outputs the _Formatted_ variable in the specified _DateTime format_
and the other variables in accordance with the date format settings specified in the operating
system.

- **Formatted**

  The _Generate date and time.Formatted_ variable provides the timestamp using the date and time
  format selected.

- **Date**

  The _Generate date and time.Date_ variable provides the date.

- **Time**

  The _Generate date and time.Time_ variable provides the time.

- **Year**

  The _Generate date and time.Year_ variable provides the year.

- **Month**

  The _Generate date and time.Month_ variable provides the month as a decimal number.

- **Day**

  The _Generate date and time.Day_ variable provides the day as a decimal number.

- **Hour**

  The _Generate date and time.Hour_ variable provides the number of hours.

- **Minute**

  The _Generate date and time.Minute_ variable provides the number of minutes.

- **Second**

  The _Generate date and time.Second_ variable provides the number of seconds.

## Wizard

The Wizard enables you to generate a timestamp based on the specified time variables, select the
starting day of the week, and specify the output format and language.

- **DateTime settings**

  Enables you to specify the date to generate.

  Select a **Generation mode** and specify the time variables to generate the desired date output.
  The available generation modes are:

  - **Current system date and time**: Uses the current system time as the timestamp.

  - **Custom date and time**: Uses the time selected in the **DateTime** field as the timestamp.

  - **Generated date and time from given variables**: Calculates the timestamp using the specified
    values.

- **Workday settings**

  Enables you to specify a given day of the month by following some rules.

  Select **Override date to** and use the dropdown options to specify a day in the month to use.

- **Calendar settings**

  Enables you to select the starting day of the week between Monday and Sunday.

- **Output settings**

  Enables you to select the **Output format** and the **Output language for the day of the week**.
