How to Check if a Date Falls Within a Range


Badge +5

I have a workflow that I need to edit but I'm not sure which action to use.

I have a two columns - Approval Date (column type = date/time) and Fiscal Year (column type = single line text).

If the date in the approval date column falls between a certain range, I want to update the Fiscal Year column to reflect that.

Example: Approval Date = 05/15/2016, Is Approval Date between 09/01/2015 and 08/31/2016?, If yes, update Fiscal Year column. If no, do nothing.

Can anyone point me in the right direction???


4 replies

Badge +16

Use set a condition to evaluate your approval date (or is less than date X). This will give you two branches to add actions to; one where that is true and one where it isn't. If you don't want two branches (ie do nothing if not true) then instead use the run if action and set it to evaluate the date value and if the condition matches (ie the fiscal year needs updating) place a update item action inside the run if container.

i can do you some screenshots later if that doesn't make sense...

Badge +5

Thanks! I was just wrapping this up and that's exactly the method I ended up using! I'll post some screenshots for other users!

Badge +5

Here's what i did folks. Used a condition to determine if my date fell between a certain range (in my case, a fiscal year). Check out my screenshots. Hope this helps!

fiscal-year-condition.jpg

fiscal-year-tree.jpg

Badge +16

Pleased you have a solution. You're not actually doing anything in you no branches though are you? Might be easier on the eye to replace with run if conditions configured the same way?

Reply