Expand my Community achievements bar.

Latest Community Ideas Review is Out: Discover What’s New and What to Expect!
SOLVED

How do I convert this 2021-07-14T00:00:00.000Z date string value into the YYYY-MM-DD format.

Avatar

Level 1

I am entering the following in 'Date Format Function' FormatDate("023-07-17T13:00:00.000Z"; "MM/DD/YYYY") in my filter.

 

The errors I am getting include

  • The bundle did not pass through the filter because of an error. Failed to evaluate filter '0-2': Function 'formatDate' finished with error! '023-07-17T13:00:00.000Z' is not a valid date.
  • 12:21 PM
    Cannot process data because of the error. The reason is: Failed to evaluate filter '0-2': Function 'formatDate' finished with error! '023-07-17T13:00:00.000Z' is not a valid date.
  • 12:21 PM
    The scenario was finalized.
1 Accepted Solution

Avatar

Correct answer by
Level 7

The year portion needs correction. It should be "2023" instead of "023" according to the ISO format. 

The corrected date format is: FormatDate("2023-07-17T13:00:00.000Z"; "MM/DD/YYYY").

View solution in original post

1 Reply

Avatar

Correct answer by
Level 7

The year portion needs correction. It should be "2023" instead of "023" according to the ISO format. 

The corrected date format is: FormatDate("2023-07-17T13:00:00.000Z"; "MM/DD/YYYY").