Forum Discussion

omiaye's avatar
omiaye
New Contributor II
2 years ago
Solved

Different Date standardization into a format

I have three different ways date column records can be made available in my excel input file for processing namely  YYYYMMDD, YYYY-MM-DD ,  and MM/DD/YYYYY. This means for any input excel file record...
  • ivicakoteski's avatar
    2 years ago

    Hi omiaye  ,

    You can try the following expression that uses the logical operator || (OR) :
    (Date.parse($Date, "yyyyMMdd") || Date.parse($Date, "dd/MM/yyyy") || Date.parse($Date, "yyyy-MM-dd")).toLocaleDateString({"format":"yyyy-MM-dd"})

    BR.
    Ivica