Set standard XML DateTime format in Microflow

A standard DateTime format in XML is yyyy-mm-ddThh:mm:ss. Therefore, I would like to format a DateTime in Microflow with the following expression: formatDateTime([%CurrentDateTime%], 'yyyy-MM-ddTHH:mm:ss') However, when I try to execute this Microflow I receive error: 2009-10-14 09:11:47.602 ERROR - MICROFLOWENGINE: Failed to evaluate expression, error occurred on line 1, character 1: java.lang.IllegalArgumentException: Illeg al pattern character 'T' formatDateTime([%CurrentDateTime%], 'yyyy-MM-ddTHH:mm:ss') Could someone let me know how I could include this T properly?
1 answers

You can use quotes to escape characters in a DateFormat. However, you also need to escape quotes in a microflow expression, otherwise the interpreter thinks your format string ends. You can do this by adding a quote before you quote. Hence, your format string should be:

formatDateTime([%CurrentDateTime%], 'yyyy-MM-dd''T''HH:mm:ss')