samwoo Posted July 26, 2024 Posted July 26, 2024 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: The help for Calculate Date Difference doesn't mention the WTC being used or not. (Also the description needs updating, it's related to the wrong utility so reporting this as a DEFECT)
Steve Giller Posted July 26, 2024 Posted July 26, 2024 Your config shows that you are calculating the difference between today and the "7 days before" date: 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) 1
samwoo Posted July 26, 2024 Author Posted July 26, 2024 Its been a long day, I've been at it for ages - @Steve Giller always the hero!
Steve Giller Posted July 26, 2024 Posted July 26, 2024 I'll flag your comment on the help information internally, though.
samwoo Posted July 26, 2024 Author Posted July 26, 2024 1 minute ago, Steve Giller said: I'll flag your comment on the help information internally, though. At least I got one thing right - Cheers Steve!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now