Hi,
I am trying - formatDateTime(item()?['ConclusionDate'],'mm/dd/yyyy')
But getting error -
Unable to process template language expressions in action 'Send_an_email_(V2)' inputs at line '0' and column '0': 'The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Null'
where am I going wrong?
Hi
I tried a modifed version of your suggestion, but it's returning nulls, not sure what I'm doing wrong?
if(empty(item()?['_Table[Datefield]']),null,formatDateTime(item()?['_Table[Datefield]'],'dd/MM/yyyy'))
This is my flow with the expression in the compose step;
Not sure what I'm doing wrong?
Hi @wonka1234 ,
This information is enough, please try this expression:
formatDateTime(body('Update_item')?['ConclusionDate'],'MM/dd/yyyy')
Best Regards,
Sunshine Gu
@v-yetonggu-msft nothign much related to ConclusionDate happens.
Date is related to the other date field in the email.
Thanks @v-yetonggu-msft . No error now, but now the body of the email is showing blank lol.
But I see in update item :
But no value is showing with your expression in the email body.
Hi @wonka1234 ,
Because there is a null value in your 'ConclusionDate' column, flow will report an error.
Please try this expression:
if(empty(item()?['ConclusionDate']),null,formatDateTime(item()?['ConclusionDate'],'mm/dd/yyyy'))
Best Regards,
Sunshine Gu
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492