Skip to main content
keerthanm0001
May 8, 2023
Solved

Expression rule for Date

  • May 8, 2023
  • 6 replies
  • 0 views

I want to convert a date from 2/JAN/2020  this format to  01/02/2020 this format.

that is if the user adds the date in dd/MM(text)/yyyy , we have to convert it to MM/dd/yyyy 

How can I achieve this

    Best answer by stefanhelzle0001

    You will have to parse such special format manually. Use split() and a list of the month names to convert it.

    6 replies

    stefanhelzle0001
    Brainy
    May 8, 2023

    You will have to parse such special format manually. Use split() and a list of the month names to convert it.

    keerthanm0001
    May 8, 2023

    Thank you so much sir,this was my first question ,and got reply very quickly

    May 8, 2023

    a!localVariables(
      local!date: "2/JAN/2020",
      local!split: split(local!date,"/"),
      datevalue(
        joinarray({ local!split[2], local!split[1], local!split[3] }, "/")
      )
    )

    keerthanm0001
    May 8, 2023

    Thank you so much sir,this was my first question ,and got reply very quickly

    tushark6475
    May 8, 2023

    You can try this approach 

    keerthanm0001
    May 8, 2023

    Thank you so much sir,this was my first question ,and got reply very quickly