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 / What causes a date fie...
Power Automate
Answered

What causes a date field that has something in it, to be considered Null by power automate?

(0) ShareShare
ReportReport
Posted on by

So I am making a flow to take data from a microsoft form formate the date to be litearlly just ddmm so if someone entered the date of today it would take 03/25/2024 and turn it into just 2503 and then put everything into an excel sheet.

I have tried two ways and both times getting a similar error.

The first way I tried was to initialize a variable called reformatted date, compose to change the dat from it's format in the form to the ddmm then set variable. THen I simply plugged it into the add row to table under birthdate. 

It said that the entry was null.

Second way I tried jut putting the expression into the birthdate column in the add row to table section.
same error basically

 

the expression i used.

formatDateTime(triggerBody()?['BirthDate'], 'ddmm')
 
Am I missing a step? There is a date there, I can see it in the excel file that gets generated by the form, but it treats it as a null.



Categories:
  • creativeopinion Profile Picture
    10,508 Moderator on at

    @rmartori You need to use capital MM.

     

    formatDateTime(triggerBody()?['BirthDate'], 'ddMM')

     

    In the meantime, you might find these YT Tutorials helpful: 

     

    How to Get a Microsoft Form RSVP Response into a SharePoint List

     

    IN THIS VIDEO:

    ✅ How to get a Microsoft Form Response into SharePoint

    ✅ How to get a Microsoft Form ID

    ✅ How to get a Microsoft Form response

    ✅ How to Build a Microsoft Form with Conditional Fields

    ✅ How to used Branching in Microsoft Forms

    ✅ How to format Microsoft Form multiple choice responses for a SharePoint multi-choice column

    ✅ How to parse a Microsoft Form multiple choice response as string of text

    ✅ How to convert a text response to a number

    ✅ How to use the Switch action

    ✅ How to create a custom email confirmation for a Microsoft Form submission

    ✅ How to Create a Custom View in a SharePoint list

    ✅ How to use the Compose Action

    ✅ How to write Power Automate Expressions

     

    ----

     

    How to Get Microsoft Form File Uploads Attached to an Email 📧

     

    In this Microsoft Power Automate Tutorial I’m going to cover where file uploads from your Microsoft Forms are saved. I’ll also show you how attach the uploaded files to an email and how to dynamically name the files and customize the recipient of the email based on the selections made in your Microsoft Form. I will also cover how to handle responses that don’t include any file uploads.

     

    IN THIS VIDEO:

    ‌✅‌ Two types of MS Forms

    ‌✅‌ Where Microsoft Personal (OneDrive) Form File Uploads are Saved

    ‌✅‌ Where Microsoft Group Form File Uploads are Saved

    ‌✅‌ How to Add a File Upload Question to an MS Form

    ‌✅‌ How to get a Microsoft Form ID

    ‌✅‌ How to get a Microsoft Form Response

    ‌✅‌ How to Get the Dynamic Content Microsoft Form File Upload Content

    ‌✅‌ How to handle Single and Multiple Microsoft Form File Uploads

    ‌✅‌ How to use a Scope action to Organize and Group Your Flow Actions

    ‌✅‌ How to Get the File Content from an MS Form File Upload

    ‌✅‌ How to Collect All Files Uploaded to a MS Form and Attach to an Email

    ‌✅‌ How to Handle MS Form Response When a File Isn’t Uploaded

    ‌✅‌ How to Create an Email Key

    ‌✅‌ How to Send an Email to a Specific Recipient Based on Form Selection

    ‌✅‌ How to Create a Dynamic Output Based on Form Selection

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution ✅.
    Consider giving me a 👍 if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram
  • rmartori Profile Picture
    on at

    I am still getting this error
    "Unable to process template language expressions in action 'Compose' 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'. Please see https://aka.ms/logicexpressions#formatdatetime for usage details.'."

    It fails at the compose step
    Ultimately what I am trying to do is fix an issue I had with the original form since I need it as "text" when it gets outputted because it gets concatenated into another cell and I didnt want to lost any leading zeroes if they were born like october 1st since I would need it to actually show as 0110

    rmartori_0-1711387097806.png

     




  • Ellis Karim Profile Picture
    12,379 Super User 2026 Season 2 on at

    Hi @rmartori ,

     

    The error could be due to the fact that the property 'BirthDate' doesn't exists -  and this may be due to you mistyping the name.

     

    Try:

    formatDateTime(variables('reformateddate'), 'ddMM')

     

    See the following for an explanation on why a Null value is being returned for the date: How to Query JSON Data Using JSON Notation with Power Automate❔❔❓ – Ellis Karim's Blog


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as ☑️ Solved.
    If you like my response, please give it a Thumbs Up.
    My Blog Site

  • creativeopinion Profile Picture
    10,508 Moderator on at

    @rmartori Can you expand your Get response details and screenshot what displays in the Birthdate field...

  • rmartori Profile Picture
    on at

    Here you go,

    error 3.png

    error 1.png

    Screenshot 2024-03-26 102444.png

  • Verified answer
    creativeopinion Profile Picture
    10,508 Moderator on at

    @rmartori Since you'd like to only reformat your date—a variable action isn't necessary in your case. You only need a Compose action. Insert an expression and use the formatDateTime() function.

    creativeopinion_0-1711463540965.png

    Click the dynamic content tab and insert the dynamic content with the date value from your form.

    creativeopinion_1-1711463560589.png

    Add a comma and insert the datetime pattern between single quotes—in your case it's ddMM.

    creativeopinion_2-1711463594220.png

     

    Run a test. Review the output of the Compose action.

    creativeopinion_4-1711463718541.png

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution ✅.
    Consider giving me a 👍 if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram

     

     

  • rmartori Profile Picture
    on at

    Well that fixed one problem but now I get this on the final step

     

    I am curious though this is almost all pulling from a Microsoft form that branches at the question type of engagement all the questions depend on if they select option A or option B, if option B the only question they answer is hourly rate, if Option A then all those other questions get answered and hourly rate is ignored. Would that cause the issue and what would be the best way to fix it?

    rmartori_0-1711464687328.png

    error 5.png

    error 4.png

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

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 271

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard