4/23

Convert Extracted Date String to Appian Date

Easy

You are given a date as a string in the format: "May 12th 2026" .The corresponding field in the database is of type Date, so the extracted string cannot be passed directly.


Your task is to write an Appian expression rule that converts the extracted date string into a valid Appian Date.


Input

A date string in the format:

ri!stringDate : "MMM DDth YYYY"


Examples:

  1. "May 12th 2026"
  2. "Apr 4th 2026"


Expected Output

A valid Appian Date.

Examples:

Input: "May 12th 2026"
Output: 2026-05-12

Input: "Apr 4th 2026"
Output: 2026-04-04


ri! Rule Inputs

ri!stringDateText
"May 12th 2026"

Example 1 — Case 1

Input: ri!stringDate
"May 12th 2026"
Output:
5/12/2026

Example 2 — Case 2

Input: ri!stringDate
"Apr 4th 2028"
Output:
4/4/2028

Example 3 — Case 4

Input: ri!stringDate
""
Output:
""

Example 4 — Case 4

Input: ri!stringDate
"Jan 1st 2000"
Output:
1/1/2000

Appian Expression Tips

  • • Use ri!variableName for rule inputs
  • • Use a!localVariables(local!x: …, body) for locals
  • • Use a!forEach(items: …, expression: fv!item) to iterate
  • • Use where() / reject(fn!isnull, list) to filter
Convert Extracted Date String to Appian Date | Appian Coding Practice | AppianVerse