Hi @mmngeoh , you can get the current day also, and just do current date - current day, it should give you the last day of the last month, and then simply apply your slice() on that generated date.
Alternatively, you use the Data&Time Shift node for this. Check this thread where I used this node with the above logic: