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.
SOLVED

Date format

DiyaR
8 - Asteroid

Hi, I am trying to change input source from string to date and then change to date format. 

Input source: 4/21/2021 (string)

I used date conversion to change string to Date.. but it gives me Null.

DiyaR_0-1620583320655.png

once field is identified as date, I want the output to read as "20210421", so I used 

 

DateTimeFormat([account open date],'%Y%m%d')

 

Since my first step is Null, this is not working. Can someone please help 🙂

Thank you

4 REPLIES 4
MarqueeCrew
20 - Arcturus
20 - Arcturus

@DiyaR ,

 

 to save input as a date:

 

datetimeparse([input],"%m/%d/%Y")

 

 to Output from a date:

 

 datetimeformat([date],"%Y%m%d")

 

 To simply change in one step:

 

 datetimeformat(datetimeparse([input],"%m/%d/%Y"),"%Y%m%d")

 

 cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
DiyaR
8 - Asteroid

Right on! 

Liked the one step. Thank you so much !

MarqueeCrew
20 - Arcturus
20 - Arcturus

@DiyaR  You're welcome!


happy Inspire

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
amruthas2
8 - Asteroid

Hi @DiyaR 

 

Link for your future reference

 

DateTime Functions | Alteryx Help

Labels