Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

MODIFYING DATE

(0) ShareShare
ReportReport
Posted on by

Hi!

 

I am trying to modify a date, but I am facing the follow issue.

 

 

I need to concat "2017" with month and day of birthday, however the system is showinf the message  

"Unable to process model language expressions in 'Update_item' entries of action on line '1' and '2132' column: 'The language function of template' startOfMonth 'expects its first parameter to be a string of characters that time stamp. The value supplied is of type 'Null'. See https://aka.ms/logicexpressions#startofmonth for usage details. '.

 

I am using formula 

 

concat('2017',startOfMonth(body('Obter_itens')?['Birthday']),dayOfMonth(body('Obter_itens')?['Brithday'])). 
 
Someone can help me?
 
Thank you.
 

 

  • Community Power Platform Member Profile Picture
    on at
    Re: MODIFYING DATE

    Thank you Kris for your help.

     

    My screen and all components names are in Portuguese (see below), however let me explain what exactly I need.

     

    I have two dates “Data de nascimento” (Brithday) and “Dia do aniversário”, both are date/time type. Annually I need to fill “Dia do aniversário” with the same day and month of “Data de nascimento” plus current Year. You are correct about startOfMonth() return and I really need the month instead of the begin of the month, however I did not find this function.

     

    By the way I am try to run this in a Image Library.

     

    I am also created a temporary field called “Temporario” (text tpe) to try identify what information my statement are generating.

     

    Well let me share my screen and try to correlated the Portuguese name of component with English name.

     

    The function CONCAT has:

     

    concat(substring(string(formatDateTime(utcNow(),'yyyy-mm-dd')),0,4),startOfMonth(body('Obter_itens')?['Data de nascimento']),dayOfMonth(body('Obter_itens')?['Data de nascimento']))19.JPG

     

  • v-xida-msft Profile Picture
    on at
    Re: MODIFYING DATE

    Hi @Marcos,

     

    Could you please share a screenshot of your flow’s configuration?

    Further, what’s the date format of your birthday?
    The error message told that there is something wrong with startOfMonth() function in your formula. The first parameter of startOfMonth() function require a string timestamp, but you provide a Null value. You could add a “Filter array” action to check if the Birthday that you provided is null.9.JPG

    Besides, I don’t think startOfMonth() function could achieve your needs. This function will return the start of the month to a string timestamp passed in rather than a Month value.

     

    I have made a test on my side and you could take a try with the following workaround:

    • Choose a proper trigger, here I use Flow button trigger.
    • Add “Get items” action of SharePoint connector, specify Site Address and List Name.
    • Add “Variables”->”Initialize variable” action. Name set to Birthday, Type set to Array, Value set to null.
    • Add a “Apply to each”, input parameter set to output of “Get items” action.
    • Within “Apply to each”, add “Set variable” action, choose Birthday for Name field, Value set to following formula:
    split(item()?['Birthday'],'-')
    • Add “Compose” action, Inputs set to following formula:
    concat('2017',variables('Birthday')?[1],variables('Birthday')?[2])

    Image reference:3.JPG

    The flow works successfully as below:4.JPG

     

     

    Bets regards,

    Kris

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,522 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,890 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow