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 Automate
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.
 

 

Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    on at

    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

  • Community Power Platform Member Profile Picture
    on at

    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

     

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 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard