Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

datetimeparse error

seelan89
6 - Meteoroid

Hi All,

 

I'm pretty new to using Alteryx and am getting the below error messages and would appreciate if i get could get some guidance on how to fix it please.

 

I have a column with dates, this is in a "date" type. I tried to do a datetimeparse formula but got the below errors.

When i tried to run the workflow without the datetimeparse i still get the "invalid date" error.

 

 

ConvError: Formula (6): DATETIMEPARSE: Cannot convert "2018-04-30" to a date/time with format "%d/%m/%Y": Expected separator '/%m/%Y', got: '18-04-30'

 

ConvError: Input Data (29): Conversion error on record: 55 - Invalid date - Earliest date supported is Dec 30, 1899

 

Many thanks

5 REPLIES 5
jrgo
14 - Magnetar

@seelan89,

 

I think the function you're looking for is DateTimeFormat(), which converts a date to a string formatted date.

seelan89
6 - Meteoroid

thanks @jrgo,

i have now tried that, but i am still getting the conversion error referring to the input  data. Is this normal or am i missing a step somewhere?

 

ConvError: Input Data (29): Conversion error on record: 55 - Invalid date - Earliest date supported is Dec 30, 1899

 

many thanks

jrgo
14 - Magnetar

@seelan89,

 

Since you're formatting the date value to a non-supported date format, the field needs to be set to a string. So if you're trying to update an existing field to that new format, it won't work. You'll need to create a new field name setting it as one of the string types. you can then use a select tool afterwards to deselect the old one and rename the new field if needed.

 

Keep in mind you can no longer do any type of date functions on that value since it's no longer in the ISO format (YYYY-MM-DD).

seelan89
6 - Meteoroid

@jrgo,

 

that makes sense. i'll try this out. thanks for your help.

Dcode
5 - Atom

In case you are trying to convert date to year-month format , this will work:

 

DateTimeFormat(DateTimeParse([Input],"%Y-%m-%d"),"%B-%Y") but as mentioned in pervious post it has to be string.

 

For my case, an alternative approach worked, i changed all dates i was using to join to 1st of the month and then used those in reporting tool to show in year-month format later

Labels