Jump to content

Simple utility required - is the date in the past, future or today


samwoo

Recommended Posts

Hi,

I have been struggling to work out whether a date provide in the ICF is before the system date or not. I need to be able to generate a task based on whether the Leaver is leaving in the future (then the ticket will go on-hold until that date), or to continue with the process if the user left in the past or are leaving today.

Unfortunately, if the date is in the past and the expiry of the task is set to that date, then an error appears hence the need to be able to make the distinction.

Using Date Difference doesn't provide a negative value regardless of whether something was in the past or in the future, so that's no good.

We cannot specify our own values/variables based on conditions... for example
if leaving_date < today() then 'PAST' elseif leaving_date > today() then 'FUTURE' else 'TODAY'

So, I am out of options. Please can I request for there to be a utility where we can determine whether a date relative to another date is in the PAST, FUTURE or TODAY. Or if anyone has any working solutions, could this be provided.

Thanks,

Samuel

Link to comment
Share on other sites

  • samwoo changed the title to Simple utility required - is the date in the past, future or today
Guest Paul Alexander

Hi @samwoo

We had a similar requirement, but what we did was to put the request on hold until the 'leaving' date and THEN trigger the task.

If the on-hold (leaving) date was in the past then this part of the process was skipped over and the task was shown immediately, but otherwise the task wasn't activated until such time as the leaving date came around and the request came off-hold.

Would that work for you? 

Link to comment
Share on other sites

Hi @Paul Alexander,

That sounds like it would be the solution - so essentially using the node to put the ticket on-hold but if the date was in the past, the ticket would remain open due to the node being skipped - what a genius find!

I'll give that a shot - thank you!

Link to comment
Share on other sites

Just re-read what you said again, and I got what you mean now - it will still display the task rather than go straight through - so that could work.

Link to comment
Share on other sites

Hey @samwoo,

I can see the benefit of knowing if the second date is in the past when compared to the first, and it was a 2 second job to make the change, so I've added a new output parameter to the Get Date Difference iBridge utility to tell you if it's in the past :) 

 

Hope this helps,

Steve

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...