In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

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

Replace characters using multifield formula tool

ikaykris
5 - Atom

I have V_String data like "2015-01-01 2400"  in multiple columns and I want to turn it into datetime format, but because the time is 2400 instead of 0000 for midnight it's giving me an error. I want to change the time to 0000 and add a day to the date and then turn it into datetime format. Any help would be much appreciated. Thank you.

2 REPLIES 2
binuacs
21 - Polaris

@ikaykris One way of doing this

binuacs_0-1677365058328.png

 

ikaykris
5 - Atom

Thank you for the help! I used part of what you sent me and solved it myself : D

I used
IF CONTAINS([_CurrentField_],"2400") THEN DateTimeAdd(DateTimeParse([_CurrentField_],'%Y-%m-%d'),1,'day') ELSE DateTimeParse([_CurrentField_],'%Y-%m-%d %H%M') ENDIF

Cheers!

Labels
Top Solution Authors