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
14 - Magnetar

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

Labels