Missed the Q4 Fall Release Product Update? Watch the on-demand webinar for more info on the latest in Designer 24.2, Auto Insights Magic Reports, and more!
Free Trial

Alteryx Designer Desktop Discussions

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

Convert Date Time to Date

dheerajasia
6 - Meteoroid

I have columns in Date time Formats.

 

Example: 11/8/2022 19:47

 

I need to change this to Date : 11/8/2022. I tried DateTimeParse formula and DateTime function but not getting any output. Help is appreciated 

5 REPLIES 5
IraWatt
17 - Castor
17 - Castor

Hey @dheerajasia,

Do you want to remove the zero from the month column?

IraWatt_0-1668455171414.png

If your interested in learning more about the datetime functions there is a great cheat sheet Blog here: https://community.alteryx.com/t5/Engine-Works/DateTime-Functions-Cheat-Sheet/ba-p/844353

 

Any questions or issues please ask

Ira Watt
Technical Consultant
Watt@Bulien.com 

 

dheerajasia
6 - Meteoroid

Hi,

In my Excel, I only see Date, HH:MM as shown below

dheerajasia_0-1668455606561.png

 

But when I am importing this file into Alteryx, it comes up in a different format and adds Seconds too.

 

Alteryx:

 

dheerajasia_1-1668455650901.png

 

I think this is causing the formula to fail. How do I fix this and convert this DateTime to just Date?

dheerajasia
6 - Meteoroid

I figured the issue. Alteryx is pulling dates in a different format than what the spreadsheet contains, making my functions useless. I used DateTime Parse tools to fix it.

I used 

 

DateTimeFormat(DateTimeParse([Date],"%Y/%m/%d"),"%m/%d/%Y") in Formula Tool to convert it

binuacs
21 - Polaris

@dheerajasia One way of doing this with the DateTimeParse function

binuacs_0-1668466220945.png

 

ShankerV
17 - Castor

Hi @dheerajasia 

 

One way to have the solution as below with Regex tool.

 

ShankerV_0-1668485824506.png

 

Feel free to mark the solution of the post which helped to resolve the issue, so similar issues faced by other community members in future can be helpful to refer the solution.

 

Many thanks

Shanker V

Labels
Top Solution Authors