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.

Converting Multiple String dates to dates in multi formula

wonka1234
10 - Fireball

hi,

 

I select my text columns in multi formula, and apply this - 

 

DateTimeParse([_CurrentField_],'%y-%m-%d')

 

but getting nulls. I want in yyyy-mm-dd format.

 

How do I fix this?

 

5 REPLIES 5
binuacs
20 - Arcturus

@wonka1234 What is the date format in your text columns? Are they in the format yyyy-mm-dd?

wonka1234
10 - Fireball

@binuacs they are in this format: 2-Oct-23

MarqueeCrew
20 - Arcturus
20 - Arcturus

@wonka1234 ,

 

A text field converts to a DATE using the DateTimeParse() and once it is a DATE data type, then the DateTimeFormat() function can be used to put it out to a text field in a wide variety of formats.

 

Your question appears to be asking how to turn a value of 2023-05-31 into 23-05-31.  I would be willing to bet that this is not what you're actually trying to do.  You might want to look at:  https://help.alteryx.com/10.1/Reference/DateTimeFunctions.htm for some guidance.

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

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

@wonka1234 You should use the same date format of your input fields in the DateTimeParse() function

 

DateTimeParse([_CurrentField_],'%d-%b-%y')

 

 

binuacs_0-1685551080109.png

 

MarqueeCrew
20 - Arcturus
20 - Arcturus

@wonka1234 ,

 

I agree with @binuacs :

 

%d = Day of the month as two digits, from 01 to 31

- dash

%b = The abbreviated month name (Feb, Oct)

- dash

%y = The two digit year.

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Labels