Hello,
I have created a field Date_C7_Alert2 which takes datetime from an existing field 'logdate'.
Date_C7_Alert2 is datetime type.
However, I get warnings like these.
How can I remove these warnings?
Thank you
Regards,
Pankhudri
Solved! Go to Solution.
Hi @Pankhudri20
Can you share more of the configurations of the tools? MM/DD/YYYY is not a valid date format, so you would need to either use a datetime tool or datetimeparse formula to convert it. My suspicion is you are trying to just update the datatype of a field with this data which wouldn't work. Alteryx needs to know how to convert the string to the datetime format (YYYY-MM-DD)
Hello @Luke_C ,
Thank you for your response.
Can you tell me how to use the datetimeparse formula to convert the data type but keep the same format?
Regards,
Pankhudri
Hi @Pankhudri20 ,
Can you please share a list of sample dates that you are looking to parse.
Best,
Jagdeesh
logdate is not a datetime file in Alteryx... Your error message says that. It says the format is
mm/dd/yyyy H:M:S AM...
You need to convert the H to a 24 hour cycle and drop the AM/PM... Post some data and it can be fixed.
@Luke_C @JagdeeshN - I've never used %i and %P in datetimeparse - have you?
format has to be:
YYYY-mm-dd H:M:S
Hi @Pankhudri20
Here's two examples based on your screenshot:
datetimeparse([Field1],'%m/%d/%Y %I:%M:%S %p')
Hi @Pankhudri20 ,
I think @Luke_C 's sample workflow should do the conversion for you.
Like @apathetichell mentioned, one part of it is because of the AM/PM - 12/24hr cycle.
Best,
Jagdeesh
@Luke_C- nice!
Hello,
Thank you for your response everyone.
I have this workflow.
I tried adding Luke's solution but it still doesnt convert
I do parse the logdate field and the new field is datetime
But I still get these warnings.
What am I doing incorrect here?
Regards,
Pankhudri
your else statement is pointing to your current field. Your current field is not datetime. this creates an error. You do not need this else statement.
let's pretend your [current field] says "True"... your if statement says if "True" then 1. You else says [current field]. "False" is not an integer so this creates an error.
User | Count |
---|---|
19 | |
15 | |
13 | |
9 | |
8 |