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 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?
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.
User | Count |
---|---|
19 | |
15 | |
13 | |
9 | |
8 |