Hi ,
I have dates in text string in dd/mm/yyyy
I am looking to have one day less than provided date in new column
Input | Expected Result |
05/02/2020 | 04/02/2020 |
09/01/2020 | 08/01/2020 |
Solved! Go to Solution.
Hey @SagarGite
I would recommend using a Formula tool to create your Expected Result field with this expression:
DateTimeFormat(DateTimeAdd(DateTimeParse([Input],"%d/%m/%Y"),-1,"day"),"%d/%m/%Y")
Starting from the inside and working out, this is
1. Taking your input, turning it into the date format that Alteryx can use
2. Subtracting one day
3. Converting the date format back into a string for your output
Hope this helps!
Hi @SagarGite ,
You will need to convert the date field to a date, you can use the date parse tool for that. Then create a new formula using the following:
datetimeadd(<date>,-1,"Days")
M.
Hello
I would start by using the DateTime tool to convert the String to a Date type format. I would then use a formula to modify the date to subtract a day.
DateTimeAdd([Date], -1, "days")
More Info can be found here: https://help.alteryx.com/current/designer/datetime-functions
DateTime Tool: https://help.alteryx.com/current/designer/datetime-tool
hey @SagarGite , this should help.