We've recently made an accessibility improvement to the community and therefore posts without any content are no longer allowed. Please use the spoiler feature or add a short message in the message body in order to submit your weekly challenge.
We'll be completing standard maintenance for our Single Sign-On system on November 30th 6pm Pacific Time for approximately one hour. During this time My Alteryx and sign-in functionality to all My Alteryx programs (Licensing Portal, Community, Beta Program, Case Portal, and others) may be inaccessible. Thank you for your patience.

Weekly Challenge

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語

We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!

Submit Feedback

Challenge #34: Date-Time Formatting

Alteryx Alumni (Retired)

Here is this week’s challenge, I would like to thank everyone for playing along and for your feedback.  The link to the solution for last challenge #33 is HERE.  For this chalenge let’s look at creating a macro from scratch.  I recommend you first solve the problem with tools on the canvas, then cake a macro from the tools.


Use Case:  Our customer has a need to convert date/time strings into a date-time format.


Examples of the different input formats include:  4/8/2015 4:00, 5/10/2015 13:00.  The conversion is automatic when the hours are 2 digits (10-24), but it ignores hours 1-9 (creates NULL values on conversion).


Objective:  Create a macro to effectively convert and preserve the data in a date-time format.

6 - Meteoroid

Thank you for posting this amazing exercise. 

I am new to Alteryx community. Does anyone know how to upload my yxmd and yxmc files onto Alteryx Community?

Here is my smiling-face macro:


Here is what's inside my smiling-face macro:




Alteryx Alumni (Retired)

Here's a solution:

Exercise 34 Solution.PNG
Former Alteryx, Inc. Support Engineer, Community Data Architect, Data Scientist then Data Engineer
17 - Castor
17 - Castor

nice quick one.

Solution attached - very similar to the provided solution

20 - Arcturus
20 - Arcturus

I think that this is straight-forward (after finding the reverse update).




Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
ACE Emeritus
ACE Emeritus

My solution.... in a single formula!! This might be the first time I've had a one-tool solution!! :)


Formula Tool = DateTimeParse(Left([date_time],FindString([date_time]," "))+" "+PadLeft(Substring([date_time],FindString([date_time]," ")+1,8),5,"0"),"%m/%d/%Y %H:%M:%s")


15 - Aurora
15 - Aurora

My solution. Took a number of tries to get everything right.

15 - Aurora

I think the datetime convert maybe my favourite tool...so easy and simple


Weekly Challenge 34.png
11 - Bolide

Solution Attached.

17 - Castor
17 - Castor