Alteryx Designer Desktop Discussions

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

add +1 day to date

KLS
8 - Asteroid

hello,

 

im trying to add + 1 day to below system date so should be 5 September 20. I am not particular on the structure of date so long it adds 1 day to the System Date. Have tried using formula using DateTimeAdd(DateTimeParse([SystemDate],"d-mon-%y"),+1,"days") but it return as Null. Many thanks in advance!

 

KLS_1-1599713347292.png

 

7 REPLIES 7
fmvizcaino
17 - Castor
17 - Castor

Hi @KLS ,

 

You almost got it right. 

DateTimeAdd(DateTimeParse([SystemDate],"%d-%b-%y"),+1,"days")

 

To know more about the parameter, see here: https://help.alteryx.com/current/designer/datetime-functions

 

Best,

Fernando Vizcaino

ImadZidan
12 - Quasar

Hello @KLS ,

 

Building on @fmvizcaino  , if you want as a string and in the same format

 

DateTimeFormat(DateTimeAdd(DateTimeParse([f],"%d-%b-%y"),+1,"days"),'%d-%b-%y')

ImadZidan
12 - Quasar

@KLS ,

sorry using system date field

 

DateTimeFormat(DateTimeAdd(DateTimeParse([SystemDate],"%d-%b-%y"),+1,"days"),'%d-%b-%y')

grazitti_sapna
17 - Castor

Hi @KLS,

 

Here is the solution:

 

DateTimeFormat(DateTimeAdd(DateTimeParse([SystemDate],"%d-%b-%y"),+1,"days"),'%d-%b-%y')

 

grazitti_sapna_1-1599714886954.png

 

 

Sapna Gupta
KLS
8 - Asteroid

Thanks @ImadZidan  @fmvizcaino  can I trouble you guys with last one. From the system date below I want to rename my output file  as "FileName"  "2020" ie input the year , thanks!

 

KLS_0-1599716389645.png

 

grazitti_sapna
17 - Castor

Hi @KLS , just replace %y with %Y, like this.

 

DateTimeFormat(DateTimeAdd(DateTimeParse([SystemDate],"%d-%b-%y"),+1,"days"),'%d-%b-%Y')

and it will work.

 

Thanks.

Sapna Gupta
ImadZidan
12 - Quasar

Hello @KLS ,

 

sorry mate I was occupied.

 

Her is an idea on the file naming.

 

please pay attention to the options in red. You may not want to override. You may need to output the filepath. It is currently pointing to my local path.

 

Well, I hope it helps or gives you an idea.

 

Filename.PNG

Labels