Andy Levy checks if this is the end of the month:
This is one of those blog posts you write so that 2 years later, you can look it up to remind yourself how to do something.
I found myself needing to figure out if “today” was the end of the month in PowerShell. In T-SQL, this is easy, as we have the
EOMONTH()
function. But PowerShell (the .NETSystem.DateTime
struct) doesn’t have the same thing.
Read on for the solution Andy came up with.