Have a look at the parseDateTime function, this lets you specify the format of the DateTime.
Something like this should work…
parseDateTime('Tue, 30 Mar 2021 10:49:42 +0200', 'EEE, d MMM YYYY hh:mm:ss Z')
To turn it back to a String, look at the formatDateTime function, using the same format string.
same error….
toString(parseDateTime($currentObject/pubdate, 'EEE, dd MMM YYYY hh:mm:ss Z'))
An error occurred while evaluating value of Main.Home.text1: Unparseable date: "Wed, 31 Mar 2021 13:13:00 +0200" Error: An error occurred while evaluating value of Main.Home.text1: Unparseable date: "Wed, 31 Mar 2021 13:13:00 +0200"
Check this at https://mydemoversion8-sandbox.mxapps.io/p/ff/ParseDateTime:
Have look what is going on: YYYY is resulting in a weird date, for which i have no explanation. You best stick with yyyy in small caps. these will give you the correct results, if you have set english as your language,
English default language → same error
Try to do it in steps in a microflow to test where you go wrong. Create a variable where you do the parseDateTime part and then create another variable where you do the to string part. If that all works as expected try to combine it in a third variable. The advantage is when you set a breakpoint in the microflow you can follow the steps and the values.
Regards,
Ronald
Had the same problem. It seems thet the MMM expects the fitst three letters of the month, followed by a dot , so december should be dec. ) I think it is the default in Dutch locale. I added an extra . in the string for myself, that did the trick...