Jump to content

Recommended Posts

Posted

Good afternoon,

I am trying to calculate whether the current date is less than provided Starting Date in a request (via Custom Field 21) minus 7 days - so before I apply anything into production, I am using a testing AutoTask to send me an email with the details from the nodes.

  • I used the Get Timestamp Utility to look at Custom Field 21 and the Operator is set to Subtract and the timeUnitDays is set to 7.
  • I also use Get Current Timestamp utility to get the current date.

No problems so far with setting this up.

Then I create the button linked to the AutoTask and tested it and here is the output:

Quote

[Using date provided in Custom Field 21]
2024-07-31 00:00:00

[Get 7 Days before Start Date]
2024-07-24T00:00:00.000Z

[Get Current Date]
2024-07-26 14:35:47Z

[Get Days until (Start Date - 7 Days)]
Days: 2.000000
Hours: 14.000000
Minutes: 35.000000
Seconds: 47.000000

It just might be me not fully understanding the output...

So, the Start Date in Custom Field 21 is 31/07/2024 and the Get 7 Days before Start Date node is correctly working out 7 days prior to the start date (5 working days) which is 24/07/2024.

Today 26/07/2024 so that means there is 5 days left until the start date...

So, when doing a Get Days until (Start Date - 7 Days) on the Get Current Date and Get 7 Days before Start Date why does it show as the number of Days being 2?

This is the configuration of the Get Days until (Start Date - 7 Days) node:

image.thumb.png.a4b12f7abd7b52e4d6bf48285771a3b1.png

The help for Calculate Date Difference doesn't mention the WTC being used or not.

image.png.474723bf39c894bb2d62cbd97c40263e.png

(Also the description needs updating, it's related to the wrong utility so reporting this as a DEFECT)

Posted

Your config shows that you are calculating the difference between today and the "7 days before" date:
image.png

2024-07-26 14:35:47Z - 2024-07-24T00:00:00.000Z is (as displayed)
Days: 2.000000 (26-24)
Hours: 14.000000 (14-0)
Minutes: 35.000000 (35-0)
Seconds: 47.000000 (47-0)

  • Thanks 1
Posted
1 minute ago, Steve Giller said:

I'll flag your comment on the help information internally, though.

 

At least I got one thing right :P - Cheers Steve!

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...