We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to -1 day to date

JenniferRubino
5 - Atom

I am trying to subtract 1 day from the Posted date which is in a format of YYYYMMDD (20210130)

I have tried the following two formulas which both have resulted in Null values.

DateTimeAdd([Posted Date],-1,"days")

DateTimeAdd(DateTimeParse([Posted Date],"%D"),-1,"days")

 

Any suggestions to fix would be helpful!

JenniferRubino_0-1623847025153.png

 

2 REPLIES 2
mceleavey
17 - Castor
17 - Castor

Hi @JenniferRubino ,

 

This is just a formatting issue. You need to convert your string to a date first:

 

mceleavey_0-1623847300997.png

 

mceleavey_1-1623847322544.png

 

hope this helps,

 

M.

 

 

 



Bulien

Qiu
21 - Polaris
21 - Polaris

@JenniferRubino 
Try to do it with one Formula tool

Capture2.PNG

Labels
Top Solution Authors