In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

DateTimeParse conversion error

carterfleming
8 - Asteroid

Can't figure out how to fix these conversion errors and didn't see any existing posts that helped me out. For reference, I'm trying to create a new column in Alteryx date format based on an existing column and also change the format for the existing column to Alteryx date format. Any and all help is appreciated.

3 REPLIES 3
DataNath
17 - Castor
17 - Castor

Hey @carterfleming, from looking over the document you have provided, your 'Input Date' is in MM-YYYY format (guessing it's months otherwise this is is a very weird date format!). However, in your Formula expression, you're telling Alteryx to parse out the Date and providing MM/DD/YYYY as the pattern, which it can't find as your field is MM-YYYY. Therefore, you'll need to use the following instead:

 

DateTimeParse([Demo Date],'%m-%Y')

 

On updating the existing field, as your records are MM-YYYY and therefore 7 characters long, you'll first need to add a select tool and increase the 'Size' of your field to allow for 10 characters when you parse the date and end up with your Alteryx-defaulted date format (YYYY-MM-DD):

 

DataNath_2-1659457977881.png

 

Then you should be able to apply the expressions as you wish!

 

DataNath_1-1659457965175.png

Andreina
Alteryx Alumni (Retired)

Hello!

 

You have to set in second parameter the format of the incoming date string data, so , in your case should be something like 

 

DateTimeParse([Invoice Period],"%m-%yyyy")

 

Hope it helps, 

 

Regards!

 

 

binu_acs
21 - Polaris

@carterfleming one way of doing this

binuacs_0-1659458815216.png

 

Labels
Top Solution Authors