Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Alteryx is here to help you solve your biggest data challenges. Read about the new Virtual Solution Center here.

Datetime formula

Highlighted
8 - Asteroid

Hello all,

 

I am trying to built a flow that is pulling data daily. I only want today's date to pull when the data comes in so I'm trying to build a formula to do that. I am using the DataTimeFormat functions of now. Not sure how to input the data to only get today's date though.  Any suggestions?Thank you in advance. 

 

 
12 - Quasar

Hi @Plewis1 ,

You  can use filter tool  to  include  only  current data .   In filter  you  can use  custom filter  and  enter 

date_column (  column with current date in table)  =  DateTimeToday()  

Highlighted
8 - Asteroid

Hi Benakesh,

 

That worked. Thank you very much. 

Highlighted
8 - Asteroid

Okay I looked at the data in the output tool, I noticed it still has all dates. I'm needing it to just pull today's date. In the formula tool I did [field name]=DataTimeNow(). What am I doing wrong? Thank you

Highlighted
8 - Asteroid

Also I might add this flow runs everyday. So the date will need to be todays date for everyday it runs. 

Highlighted
12 - Quasar

The formula tool  creates/updates  fields .  The filter tool can  include/exclude  data.  

Can you include  workflow  and/or   sample  input and output data ? 

Highlighted
9 - Comet

@Plewis1 make sure the date field in your workflow is coming across as a date data type along with the DateTimeNow() field that you're creating in a formula tool. In the filter tool you'll have to use a custom filter similar to what I created in the sample workflow attached here. Hope this helps!

Highlighted
8 - Asteroid

I don't have the new version of Alteryx Designer. I think that is why it's not giving me the option to use Date Fixed. 

Highlighted
9 - Comet

@Plewis1  Date Fixed is a field that I created in my example since the text input had to be converted to a date. If you follow my example though and create a DateTimeNow field with the formula tool and compare that to the dates that are coming through your workflow via a filter tool you'll be able to keep what you want ([YourDateField]=[DateTimeNow]). If you're still running into issues maybe you can attach a sample of your workflow?

Labels