I am trying to find out how many days old from the Approved Date Column I have renamed the column to Approved_Date and it is still not working. It used to be named Approved On... I was not sure if the space was the issue. However, the below is not working in a compose once I get it working, I will set it to a variable I can read to see if it is past X number of days old.
div(sub(ticks(formatDateTime(utcNow(),'yyyy-MM-dd')),ticks(item()?['Approved_Date'])),864000000000)
What am I doing wrong...? it was working in the past and now that I am having to point it at a new folder, I am having issues getting it working. How do I see the name of a column? like if the name was Approve On - I seem to recall seeing some strange numbers representing the space...
InvalidTemplate. Unable to process template language expressions in action 'Compose' inputs at line '1' and column '25742': 'The template language function 'ticks' expects its parameter to be a string that represents a timestamp. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#ticks for usage details.'.
I deleted my flow and rewrote it and when I used -
Hi @NathanStanford :
According to the error message, it can be inferred that the value of item()?['Approved_Date'] in your formula is null, please consider sharing your flow to us.(It's better to have some screenshots and other details)
Best Regards,
Bof
It looks like that in your div(sub(ticks formula, the Approved_Date that you are putting is not the internal name used by SharePoint/PowerAutomate for your column.
Assuming your data-source is SharePoint List.
If you go to List Settings, and then scroll to bottom half of the page, you will see all columns listed.
Now click on your column Approved_Date (or ApprovedOn or some similar name).
On the new webpage that opens, the URL will end with parameter &Field=INTERNALCOLUMNNAME
This INTERNALCOLUMNNAME is what you should put in Power Automate for your formula.
I have not checked if the formula is correct, but a good starting thing to verify is whether internal name used by SharePoint List is same that is being used in your div(sub(ticks formula ...
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
WarrenBelz
146,618
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,957
Most Valuable Professional