parseDateTime expression problem

Jonas Spitaels 0 Reputation points


When I am trying to parse the following datetime using the parseDateTime expression:

parseDateTime('Mon, 05 Dec 2023 08:49:15 GMT', 'en-US', 'r')

I get the following error:


Unable to process template language expressions in action 'Compose_3' inputs at line '0' and column '0': 'In function 'parseDateTime', the value provided for date time string 'Mon, 05 Dec 2023 08:49:15 GMT' was not valid. The datetime string must match ISO 8601 format.'.

What am I doing wrong?

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,969 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Luis Arias 5,901 Reputation points

    Hi Jonas,

    You are trying to use a date on RFC 1123 format ( and you need to use a format ISO 8601for example: ‘2023-12-05T08:49:15Z’.

    User's image

    The option is convert the date with logicapp expressions as an example:

    @{concat(split(variables('YOURDATEVAR'),' ')[3],'-',formatDateTime(concat('2023-',split(variables('YOURDATEVAR'),' ')[2],'-01'), 'MM'),'-',split(variables('YOURDATEVAR'),' ')[1])


    If the information helped address your question, please Accept the answer.

    0 comments No comments