I have an iMacros script working with data extracted from csv file. I am trying to change a format date different as is extracted from my csv file. I need 08-24-2022 to be replaced with Aug 24, 2022 basically d-mmm-yy with mmm d, yyyy
I tried something like this,, don't know how to make it work, Thank you for support!
SET date "08-24-2022"
SET dateFormatted EVAL("\"{{date}}\".replace(/(\\d{4})-(\\d\\d)-(\\d\\d)/, \"$2 $3, $1\");")
PROMPT {{dateFormatted}}
I am using: Browser: Google Chrome Version 105.0.5195.102 (Official Build) (64-bit)
iMacros Personal Edition License - Addon for Chrome -Version 10.1.1
Windows 10 (64-bit)
One "easy" Implementation: Declare the Months yourself in a Var/Array and use the Month Number as Index (to re-
split()the Array into the 12 Months) to convert it to themmmFormat, stg like:For Date="08-24-2022", this will output
Aug 24, 2022.For Date="08-04-2022", this will output
Aug 04, 2022.(=> Use
x[1]*1instead ofx[1]inzif you would preferAug 4, 2022for 1-Digit Dates from01-09to remove the Leading 0...)(Written and tested in
iMacros for FF v8.8.2, PM v26.3.3, Win10_PRO_21H2.)