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
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']))
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.
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:
split(item()?['Birthday'],'-')
concat('2017',variables('Birthday')?[1],variables('Birthday')?[2])
Image reference:
The flow works successfully as below:
Bets regards,
Kris
WarrenBelz
146,522
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,890
Most Valuable Professional