Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Filter and Capture Future date

PassION_es
9 - Comet

Hi,

 

 

I would like to ask your assistance what is the formula to capture or filter future dates in one column? 

I do not need the current day and previous dates in my report.  Thank you in Advance!

7 REPLIES 7
IraWatt
17 - Castor
17 - Castor

Hey @PassION_es,

To filter dates which are in the future you can use the filter tool with the following configuration:

IraWatt_0-1651957953513.png

 

 

ToDate([RowCount]) > DateTimeNow()

 

 

It you have any questions make sure to ask :)

HTH,

Ira

DataNath
17 - Castor

[Your Date Field] > DateTimeToday()

 

if you want it to be specific to the exact time within the current day then can use DateTimeNow().

PassION_es
9 - Comet

Hi @IraWatt & @DataNath,

 

Your formula works fine however, it did not filter or captured the rows because of the warning error: "not a valid date".  Previous datatype is String but it gives me an incorrect number of rows.  Then when I change the datatype to Date or DateTime in the Select tool, I got the error invalid date. Please refer to the attached screenshot.

Kindly help me know how to fix this column. It should have a Date datatype. Thanks

IraWatt
17 - Castor
17 - Castor

Hey @PassION_es,

Use the datetime tool to convert your string data to datetime data type:

IraWatt_0-1651961006171.png

These settings will for for your date format, I used a custom format for the tool config (dd-Mon-yy)  

PassION_es
9 - Comet

Hi @IraWatt 

 

Thankyou. Unfortunately, it only works correctly in the input file. Not in the source data from csv file.  It resulted to null (blank) values in DateTime_out column.

Would you mind to test or use the attached file if it works for you? Thank you.

PassION_es
9 - Comet

@IraWatt , kindly ignore. I already find the solution.  Format should be dd-Mon-yy instead of custom.  Thank you so much

IraWatt
17 - Castor
17 - Castor

No worries ! glad you sorted it @PassION_es :) 

Labels