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:
- Open the Select Values step and go to the Meta-data tab.
- Select your Date field under Fieldname.
- Change Type to String.
- 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).
- EEE $\rightarrow$ Outputs short day name (e.g.,
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:
- Select your integer/number field in Fieldname to use.
- Specify a Target field name (e.g.,
weekday_name). - Fill in the Field values table to map numbers to words:
1$\rightarrow$1 Mon2$\rightarrow$2 Tue3$\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")orTEXT([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");