Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Error Messages in Interface Tools with Dates

ddiesel
13 - Pulsar
13 - Pulsar

I have an app that allows users to query a SQL Database. The user is permitted to enter start and end dates (as well as other criteria). The particular table I point to only includes current year data so I want to restrict the user to only select dates in the current year.

 

With this formula, I get an invalid type in operator message:

[#1]>2016-12-31

 

This formula does not restrict the date:

[#1]>'1-january-2017'

 

What is the right formula for this use case?

Capture.PNG

 

 

5 REPLIES 5
MarqueeCrew
20 - Arcturus
20 - Arcturus

@ddiesel,

 

Hi :)

 

'2016-12-31' represents a STRING.  All dates are STRINGS.

 

[#1] > "2017-01-01"

Try that please.

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
ddiesel
13 - Pulsar
13 - Pulsar

Hello! @MarqueeCrew... fastest draw in the galaxy!

 

Configuration:

Capture.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Error message:

Capture.PNG

 

 

MarqueeCrew
20 - Arcturus
20 - Arcturus

https://meetings.webex.com/collabs/meetings/join?uuid=MBK0HP925LDF6B3CPY90DGIBP5-UCSL&epwd=fde19b0a0...

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
MarqueeCrew
20 - Arcturus
20 - Arcturus

to find this year,

 

Left([#1],4) != '2017'

 

That will error for other years.

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
ddiesel
13 - Pulsar
13 - Pulsar

Solution from @MarqueeCrew

 

Left([#1],4) != "2017"

 

Thank you!

Labels