Forum Discussion

NAl's avatar
NAl
Contributor
2 years ago
Solved

Trim and convert string into Date

How can I trim the date on the left hand side and convert this into a date value? Input Example: 18 May 2016 - 17 Mar 2017 Output example: 2016-05-18 (using the yyyy-MM-dd  format) I've tried usi...
  • Aleksandar_A's avatar
    2 years ago

    Hello NAl,

    Could you try with the following expression, and let me know if it works for you?

    Date.parse($Dates.split("-")[0].trim(),'dd MMM yyyy')

    Regards,

    Aleksandar.