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

Convert date from "MM/DD/YYYY HH:MM AM/PM" format to only "MM/DD/YYYY"

adeyang
5 - Atom

I have date field "11/5/2019 9:00 AM" which I want to remove the time portion to only have "11/5/2019". What can I do?

It is currently in V_Wstring format.

 

Thanks so much for your help!

3 REPLIES 3
JosephSerpis
17 - Castor
17 - Castor

Hi @adeyang if you just want to remove the time portion use a left function. Alteryx will only recognize YYYY-MM-DD as a true date format I mocked up a workflow which shows how to remove the time portion and convert your date into a format alteryx will reconize as a time format as well. 

grazitti_sapna
17 - Castor

Hi @adeyang , You can try this.

 

Formula: Datetimeformat(DateTimeParse([Date],"%m/%d/%y %I:%M %p"),"%m/%d/%Y")

grazitti_sapna_0-1597318051141.png

 

In case you have different date format and want to omit time you can do this.

 

Formula: left([date],9)

grazitti_sapna_0-1597318220273.png

 

Thanks.

 

 

Sapna Gupta
adeyang
5 - Atom

Thank you both, it works! 🙂

Labels