web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / HELPE ME - 'formatDate...
Power Automate
Unanswered

HELPE ME - 'formatDateTime'

(0) ShareShare
ReportReport
Posted on by

 

eyDiogoh_0-1685970827946.png

Onde eu posso realizar a correção no código! 

 

The execution of template action 'Selecionar' failed: The evaluation of 'query' action 'where' expression '{
"CD": "@item()?['Tipo do Pedido']",
"HR em Produção": "@item()?['HorasPadrão']",
"Numero Pedido ": "@item()?['Número do Pedido']",
"Estado": "@item()?['UF']",
"Status Produção": "@item()?['Status Armazém']",
" Dia início SLA": "@formatDateTime(item()?['Data de Corte'], 'dd/MM/yyyy hh:mm')",
"Fim SLA": "@formatDateTime(item()?['SLA max Separacao'], 'dd/MM/yyy hh:mm')",
"Programa de Saude": "@item()?['Programa de Saúde']",
"Volumes": "@item()?['Soma de Volumes']"
}' failed: 'The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#formatdatetime for usage details.'.

I have the same question (0)
  • OkanMTL Profile Picture
    703 Super User 2024 Season 1 on at

    Check the input of FIM SLA and INICIO SLA, the format or input is wrong. Its giving back a Null value which means it's probably empty. So try resolving these.

  • Nagarjuna462 Profile Picture
    12 on at

    Hi @eyDiogoh '
    Como o erro sugere, precisamos fazer uma verificação nula antes de usar a função "formatDateTime". Você pode usar a condição "if" dentro da expressão junto com a função "empty" para verificar se o valor é nulo ou não. Aqui está uma expressão de exemplo:

     

    if(empty(item()?['testDt']),'',formatDateTime(item()?['testDt'],'dd/MM/yyy'))

     

    Nagarjuna462_0-1685975621941.png

     

    Por favor, marque-o como solução se isso resolveu seu problema.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 223

#2
David_MA Profile Picture

David_MA 210 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 175

Last 30 days Overall leaderboard