Alteryx Designer Desktop Discussions

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

Remove date (2018)

Plewis1
8 - Asteroid

I am trying to remove last years data from the sheet and only have 2019. Do I use the formula tool or the filter tool to remove the year and also what's the formula I would use? I have googled it and couldn't find anything specific to my question. Thank you

4 REPLIES 4
BrandonB
Alteryx
Alteryx

You will want to use a filter tool. The exact expression will depend on the format of your data. If it is 2019-12-14 you could do something like 

 

left([date field], 4) = “2019”

 

This would pull in any date from 2019.

Plewis1
8 - Asteroid

What is the LEFT about? It's getting an error. The format is date

Plewis1
8 - Asteroid

The format is 2019-08-16

BrandonB
Alteryx
Alteryx

The left function takes a string and the number after the comma and returns that many characters. So in the case of 2019-12-14 in the Field1 column shown below, the function Left([Field1],4) would return the value 2019 which are the first four characters of the date. By putting Left([Field1], 4) = "2019" as the custom filter, it will only pass through records to the true output where the first four characters are 2019. I have also attached the workflow that you can download for reference. 

 

Date Filter.png

Labels