Hi all
I have a field called Date on my sharepoint list - and my flow is sending a email when that date is equel to Today date but it fail all the time as Date field is not formating in dd-MM-yyyy but in other format
my field is like this where weeks is my field name who contain the date like 30-08-2018
formatdatetime(triggerBody()?['weeks'],'dd-MM-yyyy') (but this fail)
but this one work when i try to take the Today date
formatDateTime(utcNow(),'dd-MM-yyyy')
Thanks
Solved! Go to Solution.
Hi v-yamao-msft Thanks for that but its not true
I took the calculated column and convertet it with Date function and everythings work fine.
Thank for replay.
Can you post a screen shot of your Flow so that we can better assist?
Scott
Yes i can
I try to use compose to format the value of Sharepoint list who contain the date but the formating i output is wrong
the compose 1 when i format utcnow to dd-mm-yyyy is working great but its seems like its not the same when it comes from a list ?
The date who comes from sharepoint list is a calculated date column but the Microsoft Flow is reading that null ?
i dont get it - hope some one can help me
Hi @BR1984,
Which trigger are you using?
Do you want to get all the items first then find out the one which Week is equal to Today?
I have made the following test on my side, please take it for a reference.
The flow is triggered by a Button. Then Get items from the list.
Compose2 is used to format utcnow with the following code:
formatDateTime(utcNow(),'MM-dd-yyyy')
Compose is used to format Week, just make sure put it under action Apply to each.
formatDateTime(items('Apply_to_each')?['Week'],'MM-dd-yyyy')
If they have the same date, send a notification.
Best regards,
Mabel Mao
Thanks for replay
i have just try it and i get a error
InvalidTemplate. Unable to process template language expressions in action 'Compose' inputs at line '1' and column '2507': '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 seems like calculated column who called Weeks is null - but it not true the value is 31-08-2018.
Hi @BR1984,
Thanks for updating with more details.
Yes, Calculated column is currently not supported. So you will get the error message.
Please try to use a column of type date and time, which should work.
Best regards,
Mabel Mao
Hi v-yamao-msft Thanks for that but its not true
I took the calculated column and convertet it with Date function and everythings work fine.
Thank for replay.
Can you tell me how you converted the SharePoint calculated column to a date in Flow? I cannot get calculated dates from SharePoint list to format properly in a Flow-generated email.
I've tried various permutations of "formatDateTime" and get the same error others have mentioned:
Unable to process template language expressions in action 'Compose_-_format_Hire_Date_+_3_Months' inputs at line '1' and column '2540': 'The template language function 'formatdatetime' expects its first parameter to be of type string. The provided value is of type 'Null'.
Thanks!
Generaly If you have in the flow date from UtcNow and expression calculates date you have to update item which column is formated as date. You have to open SharePoint list and go to the setting of the column.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
49 | |
18 | |
16 | |
13 | |
12 |
User | Count |
---|---|
75 | |
41 | |
25 | |
22 | |
18 |