Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Passed value to formatDateTime is treated as Null

(1) ShareShare
ReportReport
Posted on by 353
Hey everyone,
 
I'm having a really annoying issue with Power Automate, and it seems like stable flows suddenly breaking has become pretty common and MS hallmark! This latest problem is just plain weird. A flow that’s been working fine for months, maybe even years, is now failing out of the blue because it says a date is 'Null' when trying to format it.
 
This doesn’t make sense because the date is clearly there in the SharePoint list where it’s coming from. To double-check, I added Compose and Initialize Variable actions, and sure enough, the date shows up correctly.
 
 
Here's what’s happening:
 
The Get Items action grabs the date without any problems.
 

The flow then fails when it tries to format the date, saying it’s 'Null.'
 

The formula used is: formatDateTime(triggerOutputs()?['body/DateOfResignation'], 'dd.MM.yyyy').
 

What’s even more confusing is if I pass the date from Get Items into a Compose step first, then use that output to set a variable, everything works fine and there’s no error.
 
 
 
If this had been a problem from the start, I’d get it. But this flow has been running smoothly for over a year without any issues. If anyone has any idea why this is happening or can offer some help, I’d really appreciate it.
It’s frustrating when things that worked perfectly for months just stop for no obvious reason. Managing flows this way is becoming quite impossible!
 
Thanks.
  • Expiscornovus Profile Picture
    31,897 Most Valuable Professional on at
    Passed value to formatDateTime is treated as Null
    You expression refers to the trigger action. However, in your screenshot the field is coming from the Get item 2 action (which is a subsequent action).

    Try the below expression instead:
    formatDateTime(outputs('Get_item_2')['body/DateOfResignation'], 'dd.MM.yyyy')
     

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