DateTime

Get Day Of Week

6min

This action returns the index of the day of the week for a DateTime.

Document image


Inputs & Outputs

  • [ I ] Date: DateTime to get the index of the day of the week for.
  • [ I ] Numbering: Drop-down for day indexing configuration.
    • Week begins on Sunday(1) and ends on Saturday(7)
    • Week begins on Monday(1) and ends on Sunday(7)
    • Week begins on Monday(0) and ends on Sunday(6)
  • [ O ] Day number: Integer equal to the index of the day of the week.
Document image


Example Usage

  • Drag action onto canvas to get familiarized with it.
Document image

  • Declare some variables to be used with the action.
Document image

  • Assign the newly created variables.
  • Save & Run the process and then Check Instance to see the output.
Document image


Use Cases

  • Determining the day of the week for a given date.

Tips

  • To check if a date is on a weekday, consider using Is Weekday.
  • To check if a date is on a weekend, consider using Is Weekend.