Formatar data REST API #1803
Unanswered
GuilhermeDeLucca
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Your question does not make sense, because code sample is for Rest API, and you asking about javacsript. Impossible to understand what you are trying to achieve. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Good evening, how can I format the API return date?
[ { "_id": "WybROSei3", "type": "text", "content": { "text": "Contratos Ativos\n\n{foreach=content_1}\nData Vencimento: {args.item.data_vencimento} Valor {args.item.valor_aberto}\n{/foreach}" } } ]
my return
Data Vencimento: 2023-01-15 Valor 99.90
Data Vencimento: 2022-12-15 Valor 99.90
Data Vencimento: 2022-11-15 Valor 99.90
how would you like
Data Vencimento: 15/01/2023 Valor 99.90
Data Vencimento: 15/12/2022 Valor 99.90
Data Vencimento: 15/11/2022 Valor 99.90
would it be with javascript? but how do i do that inside the foreach
`var dataInput = '{args.item.data_vencimento} ';
data = new Date(dataInput);
dataFormatada = data.toLocaleDateString('pt-BR', {timeZone: 'UTC'});`
Beta Was this translation helpful? Give feedback.
All reactions