Free Trial

Alteryx Designer Desktop Discussions

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

Date Error Resulting to Null Values

crazybeauti_ful
8 - Asteroid

Hello,

 

I've attached the actual date sample that I've been working on. Basically, the dates are in yyyymmdd format (i.e. 20200414). I need them in 2020-04-14 date format. Alteryx initially reads them as V_String. I found a similar case here and thought this will solve my problem - https://community.alteryx.com/t5/Alteryx-Designer-Discussions/yyyymmdd-to-dd-month-yyyy-conversion/t...

but using the actual formula in the link gives me 2020-01-01 or 2020-12-12 or 2020-03-03 not the actual days. So I edited the substring syntax with the following --

DateTimeFormat(LEFT(tostring([Date 1]),4)+'-'+SUBSTRING(tostring(Date 1]),5,2)+

'-'+SUBSTRING(tostring([Date 1]),7,2),'%Y-%m-%d') but this gives me a null value due to a conversion error (also in the attached - date error).

 

I tried all other things that  I could find online but all of them gave me null values.

 

Help please.

 

Thank you.

2 REPLIES 2
fmvizcaino
17 - Castor
17 - Castor

Hi @crazybeauti_ful ,

 

I suggest you to use the datetime tool to do that conversion automatically.

fmvizcaino_0-1586804730343.png

 

 

 

Let me know what you think about it.

Best,

Fernando Vizcaino

crazybeauti_ful
8 - Asteroid

hi @fmvizcaino ,

 

thank you so much. 

 

I find it weird though. I tried this same tool but it gave me null values too.

 

but thanks again. appreciate your help.

Labels
Top Solution Authors