regexopenrefine

OpenRefine: swapping order strings within a column of values


I have a column of values with a range of dates formatted as DD Month YYYY, but I want this to read Month DD YYYY. So, for example "14 October 2021" should be "October 14 2021" - is there is a simple way to do this in OpenRefine?

Thank you!


Solution

  • You can use the date functions in OpenRefine to parse and format dates.

    In your case that would be:

    value.toDate("dd MMMM yyyy").toString("MMMM dd yyyy")
    

    Note that using the long form of the months is context sensitive. Meaning that parsing english month names on a french computer won't work.