Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Change date format if its incorrect

BautistaC888
8 - Asteroid

Hello,
I need to change the date values of the columns that came with "2025-05-15 18:00:00" (yyyy-mm-dd hh:mm:ss) format to this format "15/05/2025 09:00" (dd/mm/yyyy hh:mm).
Is there a way to do it if any of the values are incorrect?
I attached a flow with an example
Thank you.

4 REPLIES 4
binuacs
21 - Polaris

@BautistaC888 one way of doing this

image.png

rfoster7
11 - Bolide

Alteryx follows the ANSI standard for DateTime fields which is the yyyy-mm-dd hh:mm:ss format you mention. 

 

You can always use the formula tool and a datetimeformat() formula to output the data in whatever format you want as a string, but it will then be a string and not available for datetime calculations later on in the workflow. 

 

Assuming your need is to provide a final output in the format you describe, I'd do it at the end the way I describe. 

 

The file you attached has a bunch of weird shaped data, with the data in various different formats. If you are getting data like that, you are going to have to do multiple levels of cleaning to get the data to all be convertable to datetime then back to your string format. 

BautistaC888
8 - Asteroid

I'm sorry i attached another flow.
The change that i require is from "yyyy-mm-dd hh:mm:ss" to "dd/mm/yyyy hh:mm".
I attached the correct flow.

rfoster7
11 - Bolide

DateTimeFormat([Incorrect format],'%d/%m/%Y %I:%M')

 

Screenshot 2024-11-27 091724.jpg

 

Please bear in mind, something I see a lot of people get confused on, the formatted date is now a string, not a date, so you won't be able to do further date calculations on it in the Alteryx flow. The only point of doing this is to format the data for output. 

Labels