Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Date issue for new month

jeetamar11
7 - Meteor

I am creating a workflow that uses data month to date till yesterday's date-with system date as shown below-

 DateTimeMonth([Case Created Date]) = DateTimeMonth(DateTimeNow()) AND DateTimeYear([Case Created Date]) = DateTimeYear(DateTimeNow().

 

But the problem arises when I am going into new month and system date is for new month now- when I use following it works for the first date of the month but on 2nd day there is no data:

DateTimeMonth([Case Created Date]) = DateTimeMonth(DateTimeNow())-1 AND DateTimeYear([Case Created Date]) = DateTimeYear(DateTimeNow())

 

I also need to look for the situation when 1 day falls on a weekend or long weekend.

So basically I shd go by the month change no the date change for the 2nd condition-can someone help please

1 REPLY 1
Raj
16 - Nebula

@jeetamar11 
try using 
datetimeadd([case created date],-1,"days")
this should help.

Labels
Top Solution Authors