Invalid date inside Expression - javascript

Hi my dear friends;
Can anyone tell me why bellow flow return Invalid date?

My Problem:
I try to use {{new Date($json["New Date"]).toLocaleString('fa-IR')}} in my expression but unfortunately it show “Invalid date”, while I use timestamp in new Date function it return correct string .
{{new Date(1662927533313).toLocaleString(‘fa-IR’)}}

Best regards;

Hi @mooghermez ,

The problem is related with your first set.
You have defined the New Date value as a string. Try to define the same property as a number.
image

This will fix the current Invalid date error:
image

Hope this helps!

3 Likes