Free Trial

Alteryx Designer Desktop Discussions

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

how to remove time from end of date

maddoxs
7 - Meteor

Looking for a solution on how to get the time to be removed through alteryx at the end of the date in my data. Example below 

maddoxs_0-1660922992029.png

 

4 REPLIES 4
JagdeeshN
12 - Quasar
12 - Quasar

Hi @maddoxs ,

I am making an assumption that this value is coming into your workflow as a string. If true you can use the 'Text To Columns' tool (with space as the delimiter) to get just the first part(date).

 

Please find attached a sample to showcase the same.

 

Best,

Jagdeesh

IraWatt
17 - Castor
17 - Castor

Hey @maddoxs,

Two ways to do this. First thing to note is your date is text not a date data type. More information on the difference here: https://community.alteryx.com/t5/Interactive-Lessons/Understanding-Data-Types/ta-p/73958 or just check the docs your feeling brave https://help.alteryx.com/20221/designer/data-types

 

So one option you have is to keep your text as a text data type and use a formula like this:

 

Replace([Field1], right([Field1], 6), "")

 

IraWatt_0-1660923297198.png

The community has some quick and easy videos on formulas and the Formula Tool here https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Writing%20...

 

Option two: you can covert your text to a date data type with the date time tool:

IraWatt_1-1660923376785.png

Any questions or issues please ask

Ira Watt
Technical Consultant
Watt@Bulien.com 

 

 

 

 

Maskell_Rascal
13 - Pulsar

@maddoxs 

 

You can use the following formula if you need it to be in that format. 

 

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

 

If you'd prefer it to be stored as a date, you can instead use this formula. 

DateTimeParse([Date],'%m/%d/%Y')

 

Here is what the output looks like. 

Maskell_Rascal_0-1660923440411.png

 

Let me know if that helps. 

 

Cheers!

Phil

 

Emmanuel_G
13 - Pulsar

Hi @maddoxs ,

 

Find attached a way to do that very easily.

Emmanuel_G_0-1661161678745.png

 

Labels
Top Solution Authors