Community forum

Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
View
Go to last post Go to first unread
Offline Jon Tofte-Hansen  
#1 Posted : Monday, November 4, 2019 3:18:12 PM(UTC)
Jon Tofte-Hansen

Rank: Paid support

Joined: 2/4/2016(UTC)
Posts: 104
Denmark
Location: Hovedstaden, Copenhagen

Thanks: 8 times
Was thanked: 17 time(s) in 13 post(s)
Server/Client: 8.5.5:

I am trying to implement the built in DaysBetween variable. But it only seems to work when tested interactively. At runtime it seems that all DATE variables with date input resolves to 0.

I have put a couple in a write file task to test it, and they return expected result in the variable tool but not at run time:
{DATE(DaysBetween|2019-12-04|2019-11-04)}
{DATE(WorkdaysBetween|2019-11-01|2019-11-04)}

Am I missing something?

Edited by moderator Tuesday, November 5, 2019 10:42:28 AM(UTC)  | Reason: Not specified

Offline Gary_W  
#2 Posted : Tuesday, November 5, 2019 12:06:22 AM(UTC)
Gary_W

Rank: Paid support

Joined: 12/19/2016(UTC)
Posts: 210
United States
Location: Michigan, Dearborn

Thanks: 49 times
Was thanked: 73 time(s) in 64 post(s)
In the example the dates passed in are in a different format then what you show. Could that be it?
Variable tool when I select the days between function:
{DATE(DaysBetween|11/4/2019|12/4/2019)}
30

when I paste your example in I get 0.

I'm in the U.S., maybe it's related to the default date format for the machine?

Edited by user Tuesday, November 5, 2019 12:07:20 AM(UTC)  | Reason: Not specified

thanks 1 user thanked Gary_W for this useful post.
Jon Tofte-Hansen on 11/5/2019(UTC)
Offline Jon Tofte-Hansen  
#3 Posted : Tuesday, November 5, 2019 9:04:46 AM(UTC)
Jon Tofte-Hansen

Rank: Paid support

Joined: 2/4/2016(UTC)
Posts: 104
Denmark
Location: Hovedstaden, Copenhagen

Thanks: 8 times
Was thanked: 17 time(s) in 13 post(s)
Ahr, of course!

Thank you Gary_W for clarifying that. For some reason our server host user uses the despicable US notation...

I will put a change request for input masks.
Users browsing this topic
Guest (2)
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Scroll to Top