Alteryx Designer Desktop Discussions

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

Add DateTIme Wihout Time STamp

Pankaj_G
Meteoro

I am using this below FOrmula in MultiRow Tool

 

IF [Pack Id] = [Row+1:Pack Id] THEN DateTimeAdd([Row+1:Price Start Date2],-1,'days') elseif [Pack Id] != [Row+1:Pack Id] THEN ([End Date]) ELSE "" ENDIF

 

In output I am getting time stamp added but I don't want time stamp to be there in the output

 

Referer the below Image and I want to handle this exception in the Multi Row tool itself 

Pankaj_G_0-1666165297667.png

 

8 RESPOSTAS 8
binuacs
Arcturus

@Pankaj_G Select the Date type from the Multi-Row tool drop-down 

 

binuacs_0-1666165507429.png

 

 

OR update your formula with the toDate function

 

IF [Pack Id] = [Row+1:Pack Id] THEN toDate(DateTimeAdd([Row+1:Price Start Date2],-1,'days')) elseif [Pack Id] != [Row+1:Pack Id] THEN toDate(([End Date])) ELSE "" ENDIF

Pankaj_G
Meteoro

Doesn't seems to be working, So this part elseif [Pack Id] != [Row+1:Pack Id] THEN toDate(([End Date])) ELSE "" ENDIF Here the END Date is in string form altready so in Multi Row Output these cells are getting converted to null

@Pankaj_G , For EndDate you can use 

todate(DatetimeParse([End Date],"%m/%d/%Y %I:%M %p(add your format here)"))
Sapna Gupta
binuacs
Arcturus

@Pankaj_G Changing the data type to Date works for me

 

binuacs_0-1666168833856.png

 

Pankaj_G
Meteoro

Can you do this on attached data, I still see Null in place of End Date

Hi @Pankaj_G , Please use the updated workflow. For End Date you need to change it to date type and then use it. Excuted it on teh data you provided.

Sapna Gupta
binuacs
Arcturus

@Pankaj_G The End Date is string type, you need to change it into Date type using the DateTimeParse() function 

 

IF [Pack Id] = [Row+1:Pack Id] THEN DateTimeAdd([Row+1:Price Start Date2],-1,'days') elseif [Pack Id] != [Row+1:Pack Id] THEN DateTimeParse([End Date],'%d/%m/%Y') ELSE "" ENDIF

 

binuacs_0-1666172037188.png

 

Pankaj_G
Meteoro

Thanks guys, I have got the solution for this.

Rótulos