Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

Day Month Year Conversion in Single Column

Mike_at_CG
アステロイド

Hello Alteryx Community

 

I have a column labeled "Date" in my workflow and I am trying to convert the entire column to read as Month/Day/Year. So XX/XX/XXXX.  Currently the data is in the format of 02 Jan 2022. So two digit day + space + abbreviated month + space + 4 digit year.

 

Mike_at_CG_0-1665154281988.png

 

Hoping to get this to read as 01/02/2002.

 

Thank you for your time

3件の返信3
BrandonB
Alteryx
Alteryx

BrandonB_0-1665154553396.png

 

The first step is to convert the date string you have into an actual date data type by parsing it into a date using this:

DateTimeParse([Date], "%d %b %Y")

 

Then you can format this newly created date into whatever format you would like. In your case, you will want to use this formula:

DateTimeFormat([New Date], "%m/%d/%Y")

 

You could also wrap these both into one formula by doing:

DateTimeFormat(DateTimeParse([Date], "%d %b %Y"), "%m/%d/%Y")

 

Workflow is attached

 

-Brandon

 

 

 

 

JalenBraegelmann
アステロイド

Try this one out.

Emmanuel_G
パルサー

@Mike_at_CG 

 

A way of doing that with DateTime tool. 🙂

 

Emmanuel_G_0-1665156432007.png

 

ラベル