ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
GELÖST

Finding the max date that is a string

fitch1892
Meteor

Im trying to find the max date of each record. Ive tried using the summarize tool, but its not producing the max date of each record. What can I do? 

 

ID | date (V_string)

1   | 06/01/2012

1   | 12/03/2011

 

When I use the max function in summarize tool i get --> 12/03/2011 and i want to get 06/01/2012

 

5 ANTWORTEN 5
JamesCharnley
Pulsar

Hi @fitch1892,

 

Do you have a specific reason this needs to be a string and not a date? I'd expect it would even be easier to turn it into a date, find the maximum and turn it back into a string than hard code some string calculation. It's returning 12/03/2011 at the moment simply because 1 is bigger than 0.

Hi @fitch1892 

 

For this to work, you must convert your date(string) to a date format:

 

Felipe_Ribeir0_0-1673277176423.png

 

fitch1892
Meteor

When I do that, some of my records turn out NULL() when they shouldn't be.

@fitch1892 

 

Try one time with the above and one time with the bellow formula:

 

datetimeparse([date], '%d/%m/%Y')

datetimeparse([date], '%m/%d/%Y')

 

Felipe_Ribeir0_0-1673278028289.png

 

If you still getting errors after that, could you please share how the null cell data looks like before the formula?

fitch1892
Meteor

Thank you. I decided to use 'DateTime' tool and it worked for me.

Beschriftungen
Top-Lösungs-Autoren