In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more 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