Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Conditional formula to replace dates

BautistaC888
8 - Asteroid

Hello,
I have a database with dates (dd/mm/yyyy).
INPUT:

BautistaCaparelli_0-1617704460717.png
Desired OUTPUT:

BautistaCaparelli_1-1617704544455.png

I need two conditional formulas:
- if the [start date] is on a month before the [date] month then put the first day of the month of [date] otherwise leave the [start date].
- if the [End date] s on a month before the [date] month then put the last day of the month of [date] otherwise leave the [end date].

Thank you.

2 REPLIES 2
OllieClarke
15 - Aurora
15 - Aurora

Hi @BautistaC888 here's how I'd implement that logic:

OllieClarke_0-1617706061105.png

Personally I'd leave the output as Alteryx formatted dates, but if you need them in mm/dd/yyyy then I've shown how to convert them back.

 

Hope that's helpful

 

Ollie

 

ChrisTX
15 - Aurora

Which functions have you tried so far?

 

Take a look at DateTimeTrim, DateTimeFirstOfMonth, DateTimeLastOfMonth.

 

Here's a list of all DateTime functions: https://help.alteryx.com/current/designer/datetime-functions

 

Chris

 

Labels