I get from a JSON schema a string value with a date and time in it, looks like that 2014:05:22 17:02:16 means yyyy:MM:dd plus time . It is some kind of meta data propery I get as string and can also save it like that in a string column within a sharepoint library.
Now I added a "Date" formated column in that SP library and that library expects a format like d.M.yyyy without time. Just mapping the string field to that date column ends up with Errrors in PowerAutomate.
How to convert that string 2014:05:22 17:02:16 to 22.5.2022 and without time to avoid such errors. I tried several things but always end up with errors.
That string field with the date is a dynamic value dateTimeDigitized .....in expressions like that ('Parse_JSON')?['properties']?['dateTimeDigitized'])
Solved! Go to Solution.
Hi @mjp1973
Try the below:
Expression I used above is:
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogHi @mjp1973
Try the below:
Expression I used above is:
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogThanks a lot @abm for your reply . I will try that today and when it works i will accept it as solution.
Hi @abm ,
It will not work this way. It does not like the Compose2 output. I have placed the dynamic value dateTimeDigitized in Compose and the expression in Compose2. Maybe Compose is not right there.
that is what es output comes from JSON
Hi @mjp1973 , The expression provided seems correct. Can you please confirm the output of the Compose action?
Error message seems to suggest null value returned from Compose action.
--------------------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Hi @mjp1973
I did test it and worked as expected. Here the issue is your data. Make sure you have date in that compose. If not add an IF condition to avoid all related action steps.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogHi @abm the issue is not your expression, that seems to work. The issue is that Update file properties cannot really handle dynamic values because when run the flow all columns here yellow marked do not appear in the output means then any expression would fail. The JSON action output still shows all the correct values but Update file properties does not show the important values in the output means when I apply your expression it fails anyway. I guess that seems to be a problem with Update files properties.
User | Count |
---|---|
89 | |
41 | |
22 | |
20 | |
16 |
User | Count |
---|---|
138 | |
56 | |
47 | |
36 | |
26 |