Hi,
I have a date in {{api_service_response.Value.body.d.results[0].InvoiceDate}} which gives me "/Date(1535673600000)/"
so i want to convert to human readable format so i am doing
{{formatDate api_service_response.Value.body.d.results[0].InvoiceDate 'YYYY-MM-DD'}} but getting "null" as output,
can you guide me
Thanks
Kishore
Request clarification before answering.
Hi Kishore,
please make sure you use the new syntax (as used in handlebars) for accessing array elements when using scripting helpers:
The new syntax to access an element in an array is {{array.[0]}}. The old syntax {{array[0]}} is still supported for simple expressions, but cannot be used in combination with helpers and will be deprecated completely with one of the next releases.
So in your example it should be:
{{formatDate api_service_response.Value.body.d.results.[0].InvoiceDate 'YYYY-MM-DD'}}Regards
Jonas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.