Calculating last day of previous month based on current date

Hi.
I have one requirement where I need to create one calculated column which calculate the last day of previous month based on current date. I need to achieve this result with one node only may be column expression node with putting code in expression but somehow I am not able to make it.

However I achieved result with using many different nodes but I feel this is not the right practice to achieve this result. anyone can help me out with this?

image

Hello @Vinay1995
You can use ‘Extract Date and Time Fields’ node: Year, Month, Day (number)

You can GroupBy Year, Month afterwards; and use Max_Day as Aggregation. You can index these results back to your data table by a merge operation (Joiner).

BR

3 Likes

Duplicate of Alteryx custom column code into knime column expression node.