Hi all
I have a flow that is run from the dataverse on a reoccurring schedule. I am trying to filter the "List Rows" function by comparing the date field i have to compare is the below.
softsys_z_system_lastpayto
I have tried to compare
softsys_z_system_lastpayto@OData.Community.Display.V1.FormattedValue
but I cannot get this format recognised by the "List Rows"
I want to compare this date with "softsys_z_system_lastpayto" eq formatDateTime(addDays(utcNow(),-30),'yyyy-MM-dd')
As you can see by my flow i have tried also "Get past time" but as this flow will run at 4am the times will not match in the following format.
2022-10-12T13:00:00Z
Any assistance would be appreciated
Solved! Go to Solution.
Since you also have the time in your Dataverse dates you will need to do something that checks to see if the date and time is on or after the start of the day 30 days from now and before the start of the day 31 days from now. Note that we're using ge and lt for the comparison operators.
softsys_z_system_lastpayto ge '@{startOfDay(addDays(utcNow(), 30))}' and softsys_z_system_lastpayto lt '@{startOfDay(addDays(utcNow(), 31))}'
//start of the day 30 days from now
startOfDay(addDays(utcNow(), 30))
//start of the day 31 days from now
startOfDay(addDays(utcNow(), 31))
Hi @Wizby01
The filter query looks ok to me except you are comparing using the operator 'eq'
"softsys_z_system_lastpayto" eq formatDateTime(addDays(utcNow(),-30),'yyyy-MM-dd')
In your example data highlighted in yellow colour the value is 13/10/2022. Also you mentioned about another date which is on the 12th. I am a little bit lost here obviously 12th is not equal to 13.
2022-10-12T13:00:00Z
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogSorry the highlighted date was just my preferred format, i.e. 13/10/2022 rather than 2022-10-13T13:00:00Z. My concern was that if i compare 2022-10-13T13:00:00Z with the term eq then the date will match but the time will not. i.e. T13:00:00Z
Since you also have the time in your Dataverse dates you will need to do something that checks to see if the date and time is on or after the start of the day 30 days from now and before the start of the day 31 days from now. Note that we're using ge and lt for the comparison operators.
softsys_z_system_lastpayto ge '@{startOfDay(addDays(utcNow(), 30))}' and softsys_z_system_lastpayto lt '@{startOfDay(addDays(utcNow(), 31))}'
//start of the day 30 days from now
startOfDay(addDays(utcNow(), 30))
//start of the day 31 days from now
startOfDay(addDays(utcNow(), 31))
Love your work grantjenkins, it works really well.
User | Count |
---|---|
95 | |
45 | |
21 | |
18 | |
17 |
User | Count |
---|---|
142 | |
50 | |
43 | |
40 | |
31 |