Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Issue with formatdatetime

(0) ShareShare
ReportReport
Posted on by 287

I have a flow that produces an HTML table.  One of the date fields is throwing errors I believe because of a null value.

The field is currently 

formatDateTime(item()?['cr014_scheduledtoship'], 'M')
The flow in this area looks like:
astrontelstar_0-1626641404926.png

 

I tried using several variations but can't get the syntax for @empty to work.

 

Can anyone help me with the correct syntax?

 

Thanks

 

  • Verified answer
    tom_riha Profile Picture
    10,127 Most Valuable Professional on at
    Re: Issue with formatdatetime

    Hello @astrontelstar ,

    I'd try it as below:

    if(empty(item()?['cr014_scheduledtoship']),'',formatDateTime(item()?['cr014_scheduledtoship'], 'M'))

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492