Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Add DateTIme Wihout Time STamp

Pankaj_G
7 - Meteor

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 REPLIES 8
binuacs
21 - Polaris

@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
7 - Meteor

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

grazitti_sapna
17 - Castor

@Pankaj_G , For EndDate you can use 

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

@Pankaj_G Changing the data type to Date works for me

 

binuacs_0-1666168833856.png

 

Pankaj_G
7 - Meteor

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

grazitti_sapna
17 - Castor

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
21 - Polaris

@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
7 - Meteor

Thanks guys, I have got the solution for this.

Labels
Top Solution Authors