How to convert weekday to word, like 1 Mon, 2 Tue

we mostly print days of week as word

To convert a date or weekday number into a weekday word (e.g., 1 Mon, 2 Tue, or Mon, Tue), you can use steps under the Transform or Scripting plugin categories in Process Studio, depending on your starting input type:


Option 1: Starting from a Date Field (Recommended)

Method A: Using the “Select Values” Step

  • Plugin Category: Transform
  • Step: Select Values
  • How to configure:
    1. Open the Select Values step and go to the Meta-data tab.
    2. Select your Date field under Fieldname.
    3. Change Type to String.
    4. In the Format column, set one of the following format masks:
      • EEE $\rightarrow$ Outputs short day name (e.g., Mon, Tue).
      • EEEE $\rightarrow$ Outputs full day name (e.g., Monday, Tuesday).
      • u EEE $\rightarrow$ Outputs day number + short name (e.g., 1 Mon, 2 Tue).

Option 2: Starting from a Weekday Number (1, 2, 3…)

Method A: Using the “Value Mapper” Step

  • Plugin Category: Transform
  • Step: Value Mapper
  • How to configure:
    1. Select your integer/number field in Fieldname to use.
    2. Specify a Target field name (e.g., weekday_name).
    3. Fill in the Field values table to map numbers to words:
      • 1 $\rightarrow$ 1 Mon
      • 2 $\rightarrow$ 2 Tue
      • 3 $\rightarrow$ 3 Wed (and so on).

Option 3: Using Scripting Steps

Method A: Using the “Formula” Step

  • Plugin Category: Scripting
  • Step: Formula
  • Formula: TEXT([YourDateField] ; "u EEE") or TEXT([YourDateField] ; "EEE")

Method B: Using “Modified Java Script Value”

  • Plugin Category: Scripting
  • Step: Modified Java Script Value
  • JavaScript snippet:
var day_word = date2str(YourDateField, "u EEE");