Use the GetPart component

  • Rversion finale: Australia
  • Mis à jour 12 mars 2026
  • 1 minute de lecture
  • Get the value of a part of the date format by using the GetPart component in RPA Desktop Design Studio. For example, you might want to get the value of the month in the MM/DD/YYYY format.

    Avant de commencer

    Role required: none

    Pourquoi et quand exécuter cette tâche

    You can configure the properties for the GetPart component. For more information about these properties, see Properties of the DateTime components.

    Procédure

    1. In the Toolbox pane, navigate to Utilities > DateTime.
    2. Drag the GetPart component to the Design surface.
    3. To configure the input fields, see Configure port properties.
    4. Connect the data and control ports of the GetPart component to the corresponding ports of the other components as described in the following table.
      Port name Purpose of connection Port type Data type
      SourceDate Passes the date and time for which you want to view the part, from a previously executed component.

      Drag the Now component from DateTime to get today's date as the source date. For example, if the source date is 01-Feb-2025.

      Data In DateTime
      Format Passes the part of the date and format that the value of which is returned, from a previously executed component.

      For example, enter MMM.

      Data In String
      Return Returns the value of the part of the date format.

      If the format is MMM, the output is Feb.

      Data Out String
    5. Facultatif : To test the component, under the DESIGN tab, click Run.

    GetPart component with Now component

    Figure 1. GetPart component
    GetPart component gets a part of the date using Now component as the source date.