Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Analytic App date selector - Incorrect dates picked up

Kieran
7 - Meteor

Hello,

 

I have an issue with a workflow published to our Alteryx Gallery. It's set up to take FROM and TO dates as parameters but for some reason when I run it from the gallery, it minuses 1 day from each of the dates.

I've stripped down the workflow and attached it. In the example below, I selected May 15th to May 19th. When I ran the flow, it emails me the selected dates, which came back as May 14th to May 18th.

AlteryxDatesIssue.jpg

14 REPLIES 14
MarqueeCrew
20 - Arcturus
20 - Arcturus
I am not near a computer, but offer this suggestion:

Check the date fields and make sure that they are not datetimes.

Cheers,
Mark
Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Kieran
7 - Meteor

On the example I attached, its using a text input with the actions attached to that. So everything is coming through as strings.


Thanks though...

SeanAdams
17 - Castor
17 - Castor

Hey @Kieran

 

Are your user and your server in a different timezones?    Reason for asking is that if the date-time tool is storing this in UTC format under the covers then this would make sense and would be accurate (in a bizarre kind of way) because if it's doing a string convert under the covers from a date-time with UTC information then it will push it into the next day.

 

I've done a different version (attached) which pumps it directly into a date (no time).   Not sure if this will fix it.   What you can do to check your server time if you don't have access to it is just add a dateTimeNow function and put this in the output.

 

Updated version with all these changes attached.

 

Let me know if this gets you to a solution?

 

Kieran
7 - Meteor

The workflow you attached was created in version 11, we're still running version 10.6 so I cant open it.

I'm in Ireland (GMT), the server is in the States, central time. It shouldn't effect the date that comes back. Central time is still on the same date as me when I run the workflow...

SeanAdams
17 - Castor
17 - Castor

I've changed the version in the workflow and reattached (not sure if you know, but it's relatively easy to change the version just by opening it up in Notepad.

 

as part of this flow - I've added a check on the server date & time so that you can see the datetime on the server to see if it's offset in some way.

 

Cheers Kieran

Sean

 

 

Kieran
7 - Meteor

Still no good Sean. I uploaded your flow to our server. This is what I ran, and what came back in the excel file:

AlteryxDatesIssue.jpg

SeanAdams
17 - Castor
17 - Castor

This is very interesting 'cause it shows that when you're selecting 22nd May in your app, on the server when it pushes this into a variable and truncates the time, it's converting this to 21 May.

 

Let's try one more experiment, then I'm all out of ideas.   For this one, I'm curious to see what time is on these new fields to see if there is a time-shift back by a few hours.

are you OK to try one more experiment?

 

If you run this on your local machine, I'd expect you'll get a result similar to the screenshot below, where the date-time coming off the date-time pickers has midnight as the time (see column D and column I)

2017-06-01_9-44-17.png

 

If you're getting anything other than this when you run it in a server environment, then we may be onto something - if not, then I'm baffled :-)

 

 

Kieran
7 - Meteor

We might finally be onto something. The "ServerDateAsLocal" came back with yesterdays date. The "ServerDateTime" is correct though. This is what I see after running the workflow through our server:

 

AlteryxDatesIssue.jpg

 

****UPDATE:
I take it back. I ran it again now that the "ServerDateAsLocal" date would go past midnight. The date in that field is now correct, but the dates read in from the date selectors are still minus one day.....
AlteryxDatesIssue.jpg

 

 

SeanAdams
17 - Castor
17 - Castor

Wow Kieran - we've worked this through fairly thoroughly and I'm pretty baffled - and unfortunately I don't have a spare Alteryx Server to try this out on...

 

Does anyone else out there have access to an alteryx server to see if we an replicate Kieran's result?

Labels
Top Solution Authors