Skip to main content
Level 3
May 27, 2026
Question

Convert string to date format

  • May 27, 2026
  • 1 reply
  • 11 views

Hello,

 

In a workflow, we have a string field that is actually a date formatted as dd/mm/yyyy. We want to use that field within the workflow to filter entries from the last 30 days. How can we convert that string field to a date format?

 

Thanks

    1 reply

    Amine_Abedour
    Community Advisor
    Community Advisor
    May 27, 2026

    Hello ​@LAR1985,

    This expression should do the trick : 
     

    ToDate(Substring(@stringDate, 7, 4)+'-'+Substring(@stringDate, 4, 2)+'-'+Substring(@stringDate, 1, 2))

    This expression converts a date string in DD/MM/YYYY format into the canonical ISO format (YYYY-MM-DD) by rearranging its parts using Substring. The resulting ISO string is then passed to ToDate() to obtain a proper date value.

     

    Breakdown:

    • Substring(@stringDate, 7, 4)year part
      Extracts 4 characters starting at position 7
      Example: "27/05/2026""2026"

    • Substring(@stringDate, 4, 2)month part
      Extracts 2 characters starting at position 4
      Example → "05"

    • Substring(@stringDate, 1, 2)day part
      Extracts 2 characters starting at position 1
      Example → "27"

    Resulting string:

    YYYY-MM-DD → 2026-05-27

    Final step:

    • ToDate(...) converts this ISO-formatted string into a proper date value.

     

    Br,

    Amine

     

     

    Amine ABEDOUR