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

how to check if the column has last day of the month

sucansa
7 - Meteor

Hi,

 

I have 2 columns in my dataset.

1st with transaction date in mm/dd/yyyy 

2nd with post date in mm/yyyy.

I have to check if both the dates are the last day of the month.

 

I have not mastered datetime functions. And lastdateofmonth picks calendar date if I am right. What if I have to run the workflow for previous month's dataset.

 

Thank you

2 REPLIES 2
Luke_C
17 - Castor

Hi @sucansa 

 

This function will return the last day of the month for the date entered:

 

datetimetrim([date],'lastofmonth') - replace [date] with your field.

 

from there, you can compare it against the actual date fields to see if it is the same. If you haven't already you'll need to convert your dates from mm/dd/yyyy to yyyy-mm-dd format. You can use the datetime tool or a datetimeparse function. Let me know if you have questions on those. 

sucansa
7 - Meteor

Thank you. Had to make some tweaks as my data type was not consistent. Used date time tool and datetimeformat too to make some conversions. At the end it worked 🙂 

Labels