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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Passed value to format...
Power Automate
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.
Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard