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.

DateTime Parse

criperc
6 - Meteoroid

Hello,

 

Why is the datetime tile outputting null value when the format is correctly selected and the string contains the correct format? Also formulas like "ToDateTime" also output nulls. This is highkey making me angry 

 

criperc_0-1627177054743.png

 

3 REPLIES 3
RishiK
Alteryx
Alteryx

@criperc its worth checking whether the column is a String before you use the DateTime parse tool. Have you verified that the format of the "incoming" data matches what you've selected in the tool?

atcodedog05
22 - Nova
22 - Nova

Hi @criperc

 

Can you provide some sample data so that we can look into it.

apathetichell
18 - Pollux

This is going to sound crazy - but is it possible there is an extra space between the date and the time? Can you try segmenting by running datetimeparse([date/time],"%m/%d/%Y") in one formula block (new field - type date)

 

and:

datetimeparse(regex_replace([date/time],".*\s*(.*)$","$1"),"%H:%M:%S") for a new field type time)

 

I'm kind of winging the formulas without your exact data so I may have a typo here or there.... If my theory is correct and both of your individual parts are correct - then the culprit could be something like an extra space.

 

if this doesn't work - posting an .xlsx or .yxdb of a few dates - and just dates- that become null(() would help.

 

 

note - since posting I've played around with how the datetime tool works for multiple spaces and it does not seem to change anything. It also apparently works if a tab is there instead of a space. Perhaps the OP can try the datetimeparse formulas with regex or can try to post some (timestamp only) actual data.

Labels